By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,938 Members | 1,579 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,938 IT Pros & Developers. It's quick & easy.

Hidden textbox values lost!!

P: n/a
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.
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Check the veiwstate property for the page by default it is true.
--
BaluSmiles

"Rajesh" <di*******@yahoo.com> wrote in message
news:Os*************@tk2msftngp13.phx.gbl...
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.

Nov 17 '05 #2

P: n/a
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!!
"Balu Smiles" <ba********@hotmail.com> wrote in message
news:es**************@TK2MSFTNGP09.phx.gbl...
Check the veiwstate property for the page by default it is true.
--
BaluSmiles

"Rajesh" <di*******@yahoo.com> wrote in message
news:Os*************@tk2msftngp13.phx.gbl...
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.


Nov 17 '05 #3

P: n/a
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.

"Rajesh" <di*******@yahoo.com> wrote in message
news:Od**************@TK2MSFTNGP11.phx.gbl...
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!!
"Balu Smiles" <ba********@hotmail.com> wrote in message
news:es**************@TK2MSFTNGP09.phx.gbl...
Check the veiwstate property for the page by default it is true.
--
BaluSmiles

"Rajesh" <di*******@yahoo.com> wrote in message
news:Os*************@tk2msftngp13.phx.gbl...
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.



Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.