Click here to Skip to main content
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
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 365
1 Sergey Alexandrovich Kryukov 319
2 CPallini 275
3 DamithSL 214
4 Maciej Los 185
0 OriginalGriff 5,455
1 DamithSL 4,457
2 Maciej Los 3,885
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,115


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 25 Apr 2014
Copyright © CodeProject, 1999-2014
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