I am didnot Get Date value in my textbox control

Posted by Jayakumars under Regular Expressions on 7/5/2011 | Points: 10 | Views : 1944 | Status : [Member] [MVP] | Replies : 4
hi

my Date control like this but when retrieve date file didnot show here how to show them.


<asp:Image ID="ImgCal" runat="server" ImageUrl="~/images/Calendar.png" CssClass="calendersstyle" />

<asp:RequiredFieldValidator ID="Req" runat = "server" Display="Dynamic"
ValidationGroup="EmpCate" ControlToValidate ="TxtvDate" ErrorMessage ="*">
</asp:RequiredFieldValidator>

<asp:MaskedEditValidator ID="MaskedEditValidator3" runat="server" ControlExtender="MaskedEditExtenderSD2"
ControlToValidate="TxtvDate" Display="Dynamic" EmptyValueBlurredText="*"
ValidationGroup="EmpCate" ErrorMessage="MaskedEditValidator10" InvalidValueBlurredMessage="(dd/mm/yyyy)"
InvalidValueMessage="Valid DOA required" IsValidEmpty="False" ValidationExpression="^\d{2}/\d{2}/\d{4}$">(dd/mm/yyyy)
</asp:MaskedEditValidator>

<asp:CalendarExtender ID="CalendarExtenderSD2" runat="server" Enabled="True" Format="dd/MM/yyyy"
PopupButtonID="ImgCal" CssClass="ajax__calendar_container" TargetControlID="TxtvDate">
</asp:CalendarExtender>
<asp:MaskedEditExtender ID="MaskedEditExtenderSD2" runat="server" ClearMaskOnLostFocus="False"
Enabled="True" Mask="99/99/9999" MaskType="Date" TargetControlID="TxtvDate"
CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat=""
CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder=""
CultureTimePlaceholder="" CultureName="pt-BR">
</asp:MaskedEditExtender>

Mark as Answer if its helpful to you


Responses

Posted by: Vuyiswamb on: 7/6/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
How do you retrieve the date ?

Thank you for posting at Dotnetfunda
[Administrator]

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 7/6/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
web master
like this

((TextBox)((UserControl)((AjaxControlToolkit.TabPanel)TxtHrPrfAcNo.NamingContainer.NamingContainer.FindControl("TabPanel1")).FindControl("HrEmpll1")).FindControl("TxtDate")).Text="02/02/2001";

HrEmpll1-usercontrol id

Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 7/6/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
So basically you are trying to retrieve a value of a control in a user control ?

You cant do it this way.

You have to create a Property and make it public and access the property from the hosting page. I will try to create an example and post it here after you agree that this is what you want.


Thank you for posting at Dotnetfunda
[Administrator]

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Salman on: 2/26/2013 [Member] Starter | Points: 25

Up
0
Down
if you are using .net its better to use ajaxtookit 3.5 and use a calender control from the toolkit just give the popid of calender extender as image id and target control id as textbox id :)

Salman Farooqui

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response