Asp Code

Monday, 30 November 2020

Fetch calendar date in text box using Asp webfrom

<asp:Calendar ID="Calendar1" runat="server" BackColor="#FFFFCC" BorderColor="#FFCC66" BorderWidth="1px" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399" Height="200px" OnSelectionChanged="Calendar1_SelectionChanged" ShowGridLines="True" Width="220px">

<DayHeaderStyle BackColor="#FFCC66" Font-Bold="True" Height="1px" />

<NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC" />

<OtherMonthDayStyle ForeColor="#CC9966" />

<SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />

<SelectorStyle BackColor="#FFCC66" />

<TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt" ForeColor="#FFFFCC" />

<TodayDayStyle BackColor="#FFCC66" ForeColor="White" />

</asp:Calendar>

<br />

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>


protected void Calendar1_SelectionChanged(object sender, EventArgs e)

{

TextBox1.Text = Calendar1.SelectedDate.Date.ToString("dd/MM/yyyy");

}







Posted by Anita at 05:03
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Anita
View my complete profile

Blog Archive

  • ▼  2020 (2)
    • ▼  November (2)
      • Fetch calendar date in text box using Asp webfrom
      • CRUD operation using ADO .NET ,WEB FROM
  • ►  2017 (19)
    • ►  October (2)
    • ►  July (6)
    • ►  June (11)
Simple theme. Powered by Blogger.