ASP.NET Ajax DatePicker Server Side Event

3 posts, 0 answers
  1. Priya
    Priya avatar
    2 posts
    Member since:
    Jan 2013

    Posted 24 Jan 2013 Link to this post

    Hi 
    What is the server side equivalent of client side OnDateSelected in DatePicker control.
    I need to use the selected date in server side code. 

    Thanks.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 24 Jan 2013 Link to this post

    Hi Priya,

    You can attach SelectedDateChanged event of RadDatePicker to achieve your scenario.

    ASPX:
    <telerik:RadDatePicker ID="RadDatePicker1" runat="server" AutoPostBack="true" onselecteddatechanged="RadDatePicker1_SelectedDateChanged">
    </telerik:RadDatePicker>

    C#:
    protected void RadDatePicker1_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
    {
        DateTime dt = RadDatePicker1.SelectedDate.Value;
    }

    Hope this helps.

    Regards,
    Princy.
  3. Priya
    Priya avatar
    2 posts
    Member since:
    Jan 2013

    Posted 24 Jan 2013 Link to this post

    Hi Princy,

    Thanks for your fast response, this is what I needed.
Back to Top