Hi all,
I have set readonly property of text box as true. Coz i dont want user to be able to change it's value. It is going to contain date value, which will be inserted into it by an Ajax Calendar control. But when i accept their values in code file, it shows value as blank !! Aftwerwards I changed readonly property false before accepting value in code file, but still the same result.
How is this happening? Plz help
P.s I dont want to use labels
Shantanu88d
0
Light Poster
Recommended Answers
Jump to PostjavaScript Code:
<script language="javascript" type="text/javascript"> function showDate() { var date = document.getElementById('txtDate').value.toString(); document.getElementById('selectedDate').value = date; } </script>
page.aspx:
<asp:Button ID="btnGetDate" runat="server" OnClick="btnGetDate_Click" Text="Button" OnClientClick="showDate()"/> <input id="selectedDate" type="hidden" runat="server" />
code behind:
protected void btnGetDate_Click(object sender, EventArgs e) { string Date = …
All 4 Replies
kouroshnik
0
Light Poster
jbisono
51
Posting Pro in Training
MamathaS
0
Newbie Poster
Shantanu88d
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.