Persisting Data Web Control Table??

  • Thread starter Thread starter Hai Nguyen
  • Start date Start date
H

Hai Nguyen

I have several different tables with textboxes

I want user fill out some information into those boxes and after hit save, I
want to store all those values from those textboxes into database

I don't know why after I hit button save, all the values are gone. Pleaes
tell me how i can keep those values? We

Thanks
 
are you using html control input type=text or webontrol text box ?
if you are html control.. then you will have to access it using request
object
if not then you should be fine...
 
Hai said:
I have several different tables with textboxes

I want user fill out some information into those boxes and after hit save, I
want to store all those values from those textboxes into database

I don't know why after I hit button save, all the values are gone. Pleaes
tell me how i can keep those values? We

Thanks

I assume you mean .NET textboxes (server or HTML)....Are you sure you're
properly checking for IsPostBack in the Page_Load? You should only do
field initialization, databinding, etc. when not IsPostBack

in Page_Load:
if not IsPostBack then
txtBox1.Text = String.Empty
'databinding, etc.
end if

You can try retrieving the Request values like old ASP to see if the
values are actually there, but you shouldn't need to use this method to
get values as long as you're using .NET controls in the end.
 
Back
Top