I want to load date to the text box with full month, this means that the users will get the current date and time every time they want to save the date on the text box. They won't write anything
Here is the format i want "02 November 2015" but am not getting what am looking for. I got this results "DD-NOV-2015" and that's not what am looking for.
Should you know any simple way i can do it using j query,ajax or any,please help
Please see my code below
Page Load
protected void Page_Load(object sender, EventArgs e)
{
this.txtInceptiondate.Text = DateTime.Now.ToString("DD-MMM-yyyy",System.Globalization.CultureInfo.InvariantCulture).ToUpper();
}
Saving to the database
protected void tbnSave_Click(object sender, EventArgs e)
{
IList<tblPolicy> _Inception = _dc.tblPolicies.Where(a => a.Name == txtname.Text.ToString()).ToList();
if (_Inception != null)
{
if (_Inception.Count() == 0)
{
tblPolicy _Policy = new tblPolicy
{
Name = txtname.Text,
PolicyName = txtpolicyname.Text,
InceptionDate = txtInceptiondate.Text
};
_dc.tblPolicies.InsertOnSubmit(_Policy);
_dc.SubmitChanges();
lblresults.Visible = true;
lblresults.Text = "Welcome " + txtname.Text + " ! , Your new policy " + txtpolicyname.Text + " is well recived!";
txtpolicyname.Text = "";
txtname.Text = "";
txtInceptiondate.Text = "";
}
}
}