Probleme of Dynamic Server Control:ViewState

Q

Quickstone

Are your controls generated within the:
If Not IsPostBack Then
'***** Controls added here
End If
statement?

I had a similar problem, but then I realized that I need
to add the controls each time to the webform. I do not
need to reload the values (actually you shouldn't reload
the values for the controls like the textbox, cause that
will overwrite the value that the user has inputted), but
the controls need to be added on each postback as well. So
make sure you add them on each postback as well (i.e. do
not add your controls within the above mentioned If
statement).

Hope that helps. If not, would you be able to describe in
more detail the way you go about adding them to your
webform?


-----Original Message-----
Hie all, I generate dynamically a HtmlTable in wich I
include dynamic server control like DropDownList label...
But when I click to th Submit button in order get the
value entered by the user using the their ID it seem that
the aspx page is refreshed and I lost all the control .
Would Your mind to help me please
Our newsgroup engine supports Post Alerts, Ratings, and
Searching.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top