in repeater control validate date must not same date and selected date of one course is the next date of another course.
Repeater control as follows
RPST 29 Apr 14
RFPFF 29 Apr 14
string strdt = string.Empty;
foreach(RepeaterItem ri in rptCart1.Items)
{
CheckBox cbox = (CheckBox)ri.FindControl("chk");
if (cbox.Checked = true)
{
HiddenField lbl = (HiddenField)ri.FindControl("hdDate");
strdt = strdt + lbl.Value + ",";
}
}
string[] strRdate = strdt.Split(',');
if (strRdate.Length > 2)
{
if (strRdate[0] == strRdate[1])
{
Response.Redirect("ShiftConfirmation.aspx");
}
else
{
Label23.Visible = true;
Label23.Text = "RPST and RFPFF date must not be same. And RPST Date is the next date of RFPPF Date";
}
}
i want to check two validation the RPST and RPSCRB date must not be same date.
And RPST Date is the next date of RFPFF Date.
from my above code what changes i have to be made.
I want the output to be as follows (RPST date is the next date of RFPFF Date)
RPST 29 APR 14
RFPFF 30 APR 14
for the above outptut how can i validate in asp.net using c#.
[Edit member="Tadit"]
Added
pre
tags.
[/Edit]