Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,
i am using some date controls like start Date & End Date in my Web Form with Ajax Calendar extender,
but somehow on DropDown Postback event the value inside the Date controls gets lost and i have to re-enter the value again which is not good as per User.
and also i dont want user to edit the date controls only select the particular Date...so it should be read Only(non-Editable).


Pl reply,

Regards,
Aamir
Posted
Comments
aamir07 7-Jul-12 4:53am    
Guys, what can be done regarding this Probs?
pl reply.

Regards,
aamir

Hi,
Just add the following property in your target control i.e. Textbox.
Properties :
1. ViewStateMode="Enabled"
2. EnableViewState="true"


All the best.

--Amit
 
Share this answer
 
use Ajax Calender Extender Controller following way...its never loose value after post back of page

XML
<asp:TextBox runat="server" ID="MyTextBoxFromDate"></asp:TextBox>
            <ajax:CalendarExtender ID="MyTextBoxromDateCalendar" TargetControlID="MyTextBoxFromDate"
                Format="dd/MM/yyyy" runat="server" />
            <ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="MyTextBoxFromDate"
                MaskType="Date" InputDirection="LeftToRight" MessageValidatorTip="true" Mask="99/99/9999">
            </ajax:MaskedEditExtender>


you may add others required properties in above all controls as you your need...I have use just basic required properties
 
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