Created
July 25, 2013 01:33
-
-
Save vermiculus/6076177 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
namespace WebApplication1 | |
{ | |
public partial class DataModel | |
{ | |
public Table t; | |
} | |
public partial class WebForm1 : System.Web.UI.Page | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
hidden.Visible = false; | |
Debug.WriteLine("refreshed?"); | |
} | |
LinkedList<string[]> name; | |
protected void CreateRow(int counter) | |
{ | |
name = (LinkedList<string[]>)ViewState["table"]; | |
if (name == null) | |
name = new LinkedList<string[]>(); | |
string[] row = new string[2]; | |
row[0] = "beep" + counter; | |
row[1] = "moose" + counter; | |
name.AddLast(row); | |
ViewState["table"] = name; | |
} | |
protected void PiE() | |
{ | |
foreach (string[] row in name) | |
{ | |
TableCell ta = new TableCell(); | |
TableCell tb = new TableCell(); | |
ta.Text = row[0]; | |
tb.Text = row[1]; | |
TableRow tr = new TableRow(); | |
tr.Cells.Add(ta); | |
tr.Cells.Add(tb); | |
Table1.Rows.Add(tr); | |
} | |
} | |
protected void Button1_Click1(object sender, EventArgs e) | |
{ | |
Console.Beep(); | |
Debug.WriteLine("silliness"); | |
int c = Int32.Parse(hidden.Text); | |
CreateRow(c); | |
c = c + 1; | |
hidden.Text = c.ToString(); | |
PiE(); | |
} | |
//protected void fill() | |
//{ | |
// state.textbox1stuff = TextBox1.Text; | |
//} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment