Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 05, 2012 05:41 AM by Rohit Binjola
May 05, 2012 05:14 AM|LINK
I have a textbox.In its onclick iam calling a jquery to call calendar.Texbox is readonly. Clicking on calendar is coming and value is showing in textbox. But clicking on submit button where I have written code to save, while iam saving the data
does't save read only text box value. What may be the reason for that? i want that text box is readonly. how can i reslove this ?
please help me
May 05, 2012 05:17 AM|LINK
Try Request.Form to get value:
protected void btnSubmit_Click(object sender, EventArgs e)
string dt = Request.Form[txtDate.UniqueID];
See following sample:
May 05, 2012 05:20 AM|LINK
hi, you can read like below
string value =
or else you can set Readonly at run time like below
May 05, 2012 05:22 AM|LINK
Remove Readonly from textbox attribute and add onfocus="blur();" to it....and you do not need to change any code.
May 05, 2012 05:24 AM|LINK
Is the textbox is server control. The textbox persists there value during postback. IF possible can you place the code here.
The other alternative to save the data is using hidden field. When the date is selected and placed it textbox and the hidden filed and when the data is save use this hidden field to retrive the date.
Let me know if this resolve your issue.
May 05, 2012 05:41 AM|LINK
hi may be yuo have used !IsPostBack OR !IsCallBack inside yopur code
and the value is lost between the postbacks of the page can you please show the code so that we can help better.......