Click here to Skip to main content
11,482,373 members (68,339 online)
See more:
Repeater control as follows

CourseName Amount Coursedate
RPST 200 29 APR 2014
RFPFF 400 29 APR 2014

Then i have one button called submit.
When i click that button i want to show message RPST and RFPFF Date must not be same date and RPST date is next date of RFPFF date.

for the above two validation. how can i do in using c#.

My code as follows in submit button,

        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])
              Label23.Text = "Dates are matched";
                Label23.Text = "Dates are not matched";

When i run user has to select the date as follows (Output as follows)

CourseName Amount Coursedate
RPST 200 29 APR 2014
RFPFF 400 30 APR 2014

The RPST and RFPFF date must not same date and RPST is the next date of RFPFF date.
for that what changes i have to be made using my above code.

Narasiman P
Closed because this exact post has already been posted by another member. Reported by Nelek, Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ), ProgramFOX on Sunday, August 24, 2014 3:41am.
Posted 25-Apr-14 1:45am
Edited 24-Aug-14 3:41am
(no name)70.7K

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 25 Apr 2014
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100