We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Control datepicker inside a FormView inside an UpdatePanel

Thread ID:





142522 Feb 7,2019 03:06 PM UTC Feb 8,2019 05:23 AM UTC ASP.NET Web Forms (Classic) 2
Tags: DateTimePicker
Roger Alberto
Asked On February 7, 2019 03:06 PM UTC

Every time I try to save the value of the datepicker the value comes out null, I know that this happens to be inside an updatepanel, I have put the formview as AsyncPostBackTrigger, but still if I select the value. I also put the code from the server in C # but it does not work. I take the data from a SqlDatasource.


 protected void Persona_estudiosSqlDataSource_Inserting(object sender, SqlDataSourceCommandEventArgs e)
            e.Command.Parameters[0].Value = Id_personaHiddenField.Value;
            e.Command.Parameters[1].Value = ((DropDownList)CentroEstudiosFormView.FindControl("CentroestudiosDropDownList")).SelectedValue;
            e.Command.Parameters[2].Value = ((Syncfusion.JavaScript.Web.DatePicker)CentroEstudiosFormView.FindControl("DesdeDatePicker")).Value;
            e.Command.Parameters[3].Value = ((Syncfusion.JavaScript.Web.DatePicker)CentroEstudiosFormView.FindControl("HastaDatePicker")).Value;
        catch (Exception ex)

            ErrorMessage.Text = "Insertar centro de estudios: " + ex.Message;

Roger Alberto
Replied On February 7, 2019 04:49 PM UTC

Already solved. I put the code below. Now I'm going to test with the other controls (combox, Dropdownlist, ETC). :)

protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)

            Syncfusion.JavaScript.Web.DatePicker DesdeCE_dtp = ((Syncfusion.JavaScript.Web.DatePicker)CentroEstudiosFormView.FindControl("DesdeDatePicker"));
            Syncfusion.JavaScript.Web.DatePicker hastaCE_dtp = ((Syncfusion.JavaScript.Web.DatePicker)CentroEstudiosFormView.FindControl("HastaDatePicker"));

Prince Oliver [Syncfusion]
Replied On February 8, 2019 05:23 AM UTC

Hi Roger, 

Thank you for your update. 

We are glad the issue is resolved in your end. Please let us know, if you face any issues. 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon