Hidden textbox values lost!!

R

Rajesh

Hello all,
I have a problem here.
I have a procedure called FillForm() where I populate values for some hidden
asp:textboxes.
But after I do a postback, my values in the textboxes are lost and I see
only "" values.

Hope someone can help me with this.
Thank you.
 
R

Rajesh

Well, I I did not specify the EnableViewState property.
So by default it should be true.

Oh! and I forgot; when I make the textboxes to be visible and not hidden
anymore,
the values are retained.
Strange isnt it!!
 
R

Rajesh.V

Use html hidden control, before using right click and choose 'run as server
control'.

This is better instead of a normal textbox, when u say visible=false for any
webserver control, the control is not emitted at all.

Another good trick if u are bent on using the textbox is,
1. make its border flat instead of 3d, with no border.
2. make the background color of the text box equal to the page background
color.
3. visible can be true.
Kind of merges with the background.
 

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,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top