|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Use IsPostBack for more than one roundtripoften get and I wasn't able to solve it so far... If I habe a Custom Control which uses more than one roundtrip, e.g. a wizard control with more pages and the next/back Buttons are LinkButtons, I cannot decide what state the page has. Think of a "Import" Wizard. Page 1 loads up the csv File. Page 2 dynamically shows dropdowns of the headlines of the table in the csv and allows the user to assign his fields on the target table... Page 1 is easy, the Next Button loads up the file und shows the user the next page (which is a panel). At this moment, i should dynamically create the dropdowns. This can be done in the Next_Click Handler for example. But then, the User selects his field combinations. Each Drop is AutoPostBack=true. He selectes the first field. Now the Problem is that we have another Event... (dropdown_selected...) and not Next_Click and there is no way to build the dropdowns again. I cannot do this in Page_Load because, the Next-Click event fires after Page_Load... Any suggestions? Override the LoadViewState of the page, and build/rebuild the controls there
when needed. Protected Overrides Sub LoadViewState(ByVal savedState As Object) MyBase.LoadViewState(savedState) if viewstate("LoadControls") & "" = "true" then CallLoadControls End if End Sub Show quoteHide quote "AndiRudi" wrote: > Hi, i am trying to build a wizard control and return to a problem, that I > often get and I wasn't able to solve it so far... > > If I habe a Custom Control which uses more than one roundtrip, e.g. a wizard > control with more pages and the next/back Buttons are LinkButtons, I cannot > decide what state the page has. > > Think of a "Import" Wizard. Page 1 loads up the csv File. Page 2 dynamically > shows dropdowns of the headlines of the table in the csv and allows the user > to assign his fields on the target table... > > Page 1 is easy, the Next Button loads up the file und shows the user the > next page (which is a panel). At this moment, i should dynamically create the > dropdowns. This can be done in the Next_Click Handler for example. But then, > the User selects his field combinations. Each Drop is AutoPostBack=true. He > selectes the first field. Now the Problem is that we have another Event... > (dropdown_selected...) and not Next_Click and there is no way to build the > dropdowns again. > > I cannot do this in Page_Load because, the Next-Click event fires after > Page_Load... > > Any suggestions?
Base Page Design Question
style width and height dynamic user control textbox is empty when accessing from aspx pag ByVal sender As Object, ByVal e As EventArgs - can I send more? How to create HTML controls a runtime GridView EmptyDataTemplate Question Left Side menu control Parsing nested Tags Bizarre - DataGrid inside HTML Table Display items from dropdown list in alphabetical order |
|||||||||||||||||||||||