Click here to Skip to main content
15,904,288 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,
there is a text field which is in read only state and there is text in it.now i am fetching the text and passing it to method.but when coming to method the text value is not showing up, its showing "".can any one help me.

thank you.
Posted
Updated 31-May-11 20:11pm
v2

try this
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
     TextBox1.Text = Server.HtmlEncode(Request.Form(TextBox1.UniqueID))
End Sub
 
Share this answer
 
v2
Comments
randheer kumar 1-Jun-11 2:17am    
thank you it worked.its an exact solution which i needed.
Make sure your textbox has some value in it.
Try debugging your code by putting break points at the place where the function is called.
Have a look at the stack trace to see if there is some method call in between.
 
Share this answer
 
Comments
randheer kumar 1-Jun-11 2:47am    
the text box is having the value.the problem is solved, thank you for the suggestion.
Show us your code. Are you referencing the textbox like this: CONTROLNAME.Text

Have you tried debugging your code to ensure it's going where you think it is?
 
Share this answer
 

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