B
bill
I am using VS2005 to build a web form dynamically.
I'm using AddHandler to connect a custom event handler to the TextChanged
event of dynamically added textbox controls. Data entered in the
dynamically added textbox controls is saved to a database in the custom
event handler.
The custom event handler fires when the page posts back. I have a menu
control which causes a postback, and the custom event handler then fires if
a textbox was changed.
After the custom event handler is finished responding to TextChanged events,
the MenuItemClick event of the menu control fires. This loads a new page
based on the menu selection, which is captured in the MenuItemClick event.
Since I have to 're-add' the previous controls in the Page_Init event so the
custom TextChanged event will fire, the only way I could figure out to load
the new page was to use Server.transfer when the MenuItemClick event occurs.
I use a query string to pass along the menu selected value and other needed
data.
Is this the best way to manage this situation? It seems to work OK, but it
seems kludgy.
Thanks
Bill
I'm using AddHandler to connect a custom event handler to the TextChanged
event of dynamically added textbox controls. Data entered in the
dynamically added textbox controls is saved to a database in the custom
event handler.
The custom event handler fires when the page posts back. I have a menu
control which causes a postback, and the custom event handler then fires if
a textbox was changed.
After the custom event handler is finished responding to TextChanged events,
the MenuItemClick event of the menu control fires. This loads a new page
based on the menu selection, which is captured in the MenuItemClick event.
Since I have to 're-add' the previous controls in the Page_Init event so the
custom TextChanged event will fire, the only way I could figure out to load
the new page was to use Server.transfer when the MenuItemClick event occurs.
I use a query string to pass along the menu selected value and other needed
data.
Is this the best way to manage this situation? It seems to work OK, but it
seems kludgy.
Thanks
Bill