J
john doe Jr
The problem is the following pseudo code causes you need to click buttons
twice to get event.
This is notable via debugging and single stepping.
I can't seem to quite figure out how to do events in ASP where they need to
rerender the page.
I been banging my head on this for 4 days now.
Page_Load
If (Page.PostBack)
Session["currentDir"] = App["rootDir"]
updateTable(Session["currentDir"]
updateTable(currentDir)
string[] dirs = Directory.GetDirectories(currentDir)
foreach dir in dirs
button.Attribs["dir"];
button.Click = myButton_click
tCell1.Controls.Add(button)
Tabl1.Rows.Add(tRow)
myButton_click
Session["currentDir"] = button.Attribs["dir"]
// previously I used this statement but I found it caused the
event to fire twice (cause it wouldn't work period if I didn't have it run
again in page load
// updateTable(button.Attribs["dir"]
twice to get event.
This is notable via debugging and single stepping.
I can't seem to quite figure out how to do events in ASP where they need to
rerender the page.
I been banging my head on this for 4 days now.
Page_Load
If (Page.PostBack)
Session["currentDir"] = App["rootDir"]
updateTable(Session["currentDir"]
updateTable(currentDir)
string[] dirs = Directory.GetDirectories(currentDir)
foreach dir in dirs
button.Attribs["dir"];
button.Click = myButton_click
tCell1.Controls.Add(button)
Tabl1.Rows.Add(tRow)
myButton_click
Session["currentDir"] = button.Attribs["dir"]
// previously I used this statement but I found it caused the
event to fire twice (cause it wouldn't work period if I didn't have it run
again in page load
// updateTable(button.Attribs["dir"]