hi,
I an using a simple asp,net form to get the name, number and email address from my web page. It works fine but there is also a JS date picker which looks good and I am happy with it. My question is how do I pass the selected date to the code behind which already captures the entry to the 3 text boxes. name, number, email.... Code below
aspx
<form class="contact-form" id="form1" runat="server">
<div class="input-group">
<asp:TextBox ID="name" placeholder="Name" onfocus="this.placeholder = ''" onblur="this.placeholder = 'name'" class="input--style-2" type="text" runat="server"></asp:TextBox>
</div>
**<div class="row row-space">**
**<div class="col-2">**
**<div class="input-group">**
**<input class="input--style-2 js-datepicker" type="text" placeholder="Best visit date" name="birthday">**
**<i class="zmdi zmdi-calendar-note input-icon js-btn-calendar"></i>**
**</div>**
**</div>**
<div class="row row-space">
<div class="col-2">
<div class="input-group">
<asp:TextBox ID="number" placeholder="Best phone number" onfocus="this.placeholder = ''" onblur="this.placeholder = 'name'" class="input--style-2" type="text" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="row row-space">
<div class="col-2">
<div class="input-group">
<asp:TextBox ID="email" placeholder="Best email" onfocus="this.placeholder = ''" onblur="this.placeholder = 'name'" class="input--style-2" type="text" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="p-t-30">
``` <asp:LinkButton ID="Button1" OnClick="Button1_Click" Class="btn btn--radius btn--green" runat="server">Submit</asp:LinkButton>
</div>
</form>
protected void Button1_Click(object sender, EventArgs e)
{
mailMessage.IsBodyHtml = true;
mailMessage.Subject = "xxxxxxxxxx" + " ";
mailMessage.Body = "<html><body>" +
"<P style='font-family:Verdana; font-size: 1em;'>" +
"Client Email: " + email.Text + "<br>" + "<br>" +
here i want to add the selected date
**"Sender DATE: " + number.Text + "<br>" +**
"</p>" +x
mailMessage.To.Add("xxxxxxxxxxxxxx");
mailMessage.From = new MailAddress("xxxxxxxxxxxx");
//send the message
//send the message
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("xxxxxxxxx");
System.Net.NetworkCredential User = new System.Net.NetworkCredential("xxxxxxxxxxxxx", "xxxxxxxxxxxx");
smtp.Credentials = User;
smtp.Send(mailMessage);
}
thank you