Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have one textbox having jquery date-time picker with time also. When i am selecting date with time its populating to respective textbox. But i have one drop-down with auto post back.My problem is when I am selecting values from drop-down then post back is happening but textbox value is resting. So how to keep same value that i have selected from datetime in jQuery or ASP.Net or C#
Posted
Comments
Peter Leow 20-Mar-15 1:19am    
Can you show the relevant part of your code?
F-ES Sitecore 20-Mar-15 4:57am    
The answer depends on the type of textbox you are using. If it is something like

<input type="text" name="myDate"/>

then you can do something like


<input type="text" name="myDate" value="<%=Request.Form["myDate"]%>"/>

1 solution

Use ViewState to retain it value between calls.

Control.ViewState Property
 
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