Well, than don't try to assing a string to a datetime variable! What's wrong with something like this:
if (Txtfromdate.SelectedDateValue.DayOfWeek != DayOfWeek.Monday)
{
lblmsg.Text = "Yo must select the monday date only";
return;
}
Assuming that
SelectedDateValue
field is of type
DateTime
, since it is not clear what kind of object
Txtfromdate
is.