Congratulations - C# Corner Q4, 2022 MVPs Announced
Why Join
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Akhter HUssain
1.2k
1.1k
76.9k
String was not recognized as a valid DateTime.'
Sep 9 2019 8:04 AM
When i selecting row from gridview for editng and does not has date in date column then this exception is raising
String was not recognized as a valid DateTime.'
protected
void
Edit(
object
sender, EventArgs e)
{
using
(GridViewRow row = (GridViewRow)((LinkButton)sender).Parent.Parent)
{
txtEmpID.ReadOnly =
true
;
txtEmpID.Text = row.Cells[0].Text;
txtEmpName.Text = row.Cells[1].Text;
txtFahterName.Text = row.Cells[2].Text;
//ddlSecID.ClearSelection();
//ddlSecID.Items.FindByText(row.Cells[3].Text).Selected = true;
//txtjdate.Text = row.Cells[4].Text;
ddlSecID.ClearSelection();
if
(ddlSecID.Items.FindByText(row.Cells[3].Text) !=
null
)
{
ddlSecID.Items.FindByText(row.Cells[3].Text).Selected =
true
;
}
txtjdate.Text = Convert.ToDateTime(row.Cells[4].Text).ToString(
"dd/MM/yyyy"
);
txtldate.Text = Convert.ToDateTime(row.Cells[5].Text).ToString(
"dd/MM/yyyy"
);
popup.Show();
}
Reply
Answers (
4
)
System.ArgumentNullException: 'Value cannot be null. Paramet
MSB3073 The command "npm install" exited with code 1