1
Answer

open new aspx page after click event on dynamically created control

Photo of rulec444

rulec444

20y
1.9k
1
I am having difficulty with opening a new aspx page when the onclick event fires on a dynamically created button. The buttons and number of buttons are created based on records stored in a database/table for a customer. This code is in the page load of the aspx.cs page: ___________________________________________________________________________ String scriptString = " ___________________________________________________________________________ And in the code behind of the Notes.aspx.cs page, I have included this in the page load: ____________________________________________________________________________ extid = Convert.ToInt32(Request.QueryString["extid"]); custid = Convert.ToInt32(Request.QueryString["custid"]); ___________________________________________________________________________ However, when I run the app and click on the "QA Signoff" button, my Notes page comes up as "The page cannot be found". I've set breakpoints and stepped through the code, but am not able to identify the problem. Any suggestions? Thanks for your help.

Answers (1)

0
Photo of prathameshk
NA 5 0 20y
Yes this would work fine. In fact it does. But I have hundreds of controls carefully aligned, attributes set, et all on the forms. And if I remove and add them it would mean doing the whole thing again.
0
Photo of fixme
NA 32 0 20y
Have you tried removing the control and adding it again to the form? This will cause the designer to remove the generated code and replace it. These types of issues are the very reason I don't use the designer.