TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ravi Pandit
NA
27
1.6k
Ajax Calendar Extension
Sep 23 2017 6:16 AM
I want to store the date into database but it is taking only the default date 01-Jan-1900. Please tell me how i can save the selected date into database and reflect it in the gridview
My Code is:
Design:
<tr>
<td>
<label>Date Of Birth</label>
</td>
<td>
<asp:TextBox ID="txtDateForm" runat="server" Placeholder="dd-MMM-yyyy"></asp:TextBox>
<asp:ImageButton ID="popdate" ImageUrl="~/calender.jpg" runat="server" Height="16px" Width="17px" />
<asp:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="popdate" TargetControlID="txtDateForm" Format="dd-MMM-yyyy"></asp:CalendarExtender>
</td>
</tr>
Aspx.cs
if (!string.IsNullOrEmpty(txtDateForm.Text.Trim()))
{
date = DateTime.Parse(txtDateForm.Text.Trim());
}
cmd.Parameters.AddWithValue("@RegDate", date);
Reply
Answers (
0
)
Dynamically bind Id to a Datatable column
telerik radgrid pdf,excel,csv,word download not working