Link to home
Start Free TrialLog in
Avatar of thomas455
thomas455

asked on

Content of a read only textbox are not being saved in table in asp.net - VB

Hi experts,

I have a registration form designed on asp.net/VB and made use of ajax for a calendar. When the user selects his DOB from the calendar, the age is automatically calculated and displayed in a read only text box.

My problem is that when i click on register, all the contents of the other texbox are saved in database except for the age textbox which is on read only mode.

Any idea about this?
Avatar of Vishal Tankariya
Vishal Tankariya
Flag of India image

Hi,

Put the below line to access the textbox value.
 Dim strDate As String = Request.Form(txtDate.UniqueID)

Open in new window

so you need to tell us how the value of DOB is being populated and how this value is being saved into database.
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
By default, a form will not post back data contained in a disabled control
You need to tell it to do so like:

    <form id="xxx" submitdisabledcontrols="true" runat="server">

Open in new window

Avatar of thomas455
thomas455

ASKER

This makes perfect sense. Did not think out that