Make sure in the aspx, you did not use the readonly . if you set readonly in aspx or design time, remove it.
Assign readonly to true only in the code behind(in aspx.cs file) in the page load as
txtbx.Attributes.Add("readonly","true");
Just check if you can assign the value through javascript(that part, i am not sure). If you are able to , then the textbox holds the value(displayed in UI) and u can read it using txtbx.Text
stylish16
Member
13 Points
68 Posts
Re: Not getting date from asp:textbox
May 23, 2012 08:26 AM|LINK
No.
I have made the chnages.
That way, the user wont be able to change the value.
But, Value can't be read by txtbx.Text
Ravi Kumar K...
Member
727 Points
155 Posts
Re: Not getting date from asp:textbox
May 23, 2012 08:42 AM|LINK
The Value can be read by txtbx.Text.
Make sure in the aspx, you did not use the readonly . if you set readonly in aspx or design time, remove it.
Assign readonly to true only in the code behind(in aspx.cs file) in the page load as
txtbx.Attributes.Add("readonly","true");
Just check if you can assign the value through javascript(that part, i am not sure). If you are able to , then the textbox holds the value(displayed in UI) and u can read it using txtbx.Text
stylish16
Member
13 Points
68 Posts
Re: Not getting date from asp:textbox
May 23, 2012 08:47 AM|LINK
Thanks a lot Mr. Ravi Kumar.
You Solved my issue & save my time.
I had used txtbx.ReadOnly = True in code behind.
Thanks again.
Have a nice day ahead.