在转发器控制中,验证日期不得与同一日期相同,并且一个课程的选定日期是另一个课程的下一个日期 [英] in repeater control validate date must not same date and selected date of one course is the next date of another
问题描述
在转发器控制中,验证日期不得与同一日期相同,并且一门课程的选定日期是另一门课程的下一个日期。
中继器控制如下
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想要检查两次验证,RPST和RPSCRB日期必须不是同一日期。
和RPST日期是RFPFF日期的下一个日期。
来自我的上述代码我必须做出哪些更改。
我希望输出如下(RPST日期是RFPFF日期的下一个日期)
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
上面的outptut
如何使用c#在asp.net中验证。
添加预
标签。
[/编辑]
推荐答案
这篇关于在转发器控制中,验证日期不得与同一日期相同,并且一个课程的选定日期是另一个课程的下一个日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!