Persisting Data Web Control Table??

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
 
H

Hermit Dave

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...
 
C

Craig Deelsnyder

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.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top