Click here to Skip to main content
11,411,922 members (60,476 online)
See more: Csharp.net
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 asp.net 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";
                 
             }
            else
            {
                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.

Regards,
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
v2

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

  Print Answers RSS
0 OriginalGriff 268
1 Sergey Alexandrovich Kryukov 200
2 Sascha Lefévre 170
3 ProgramFOX 130
4 Maciej Los 110
0 Sergey Alexandrovich Kryukov 8,955
1 OriginalGriff 7,158
2 Maciej Los 3,480
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web01 | 2.8.150414.5 | 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