Click here to Skip to main content
16,021,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

All server controls(textboxes) is in Div, which is runat="server" and Button also in this div.
Problem is that When i Click the button, the textboxes values become this "" .
What should i do.

Sutotpal
Posted
Comments
Ankur\m/ 31-Aug-10 8:36am    
Please use 'Add Comment' below a user's answer to discuss with him rather than adding an answer.
suzeets 1-Sep-10 1:20am    
check viewstate property...

1 solution

This is not possible. AFAIK, ControlState preserves the value of the text in a TextBox.

Are you assigning the value of TextBox to empty string ("") anywhere in the code?
 
Share this answer
 
Comments
Ankur\m/ 31-Aug-10 8:37am    
[moved from answer]:
sutotpal wrote:
hi Ankur,

No, i m not assigning any string to textboxes in the code.
Ankur\m/ 31-Aug-10 8:40am    
Try debugging the code then. Put a break-point at Page_Load event and check the value of the TextBoxes after you submit the page (after button click). Does it show "" ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900