Hello again Mates,
I have the control below with default value of uly 08 2011.
<asp:TextBox runat="server" ID="txtEventDate" CssClass="TextBox" Width="157px" Value="Jul 08 2011" />
The date remains July 08 but the only thing that changes is the year.
For instance, next year, which is 2012, the date will be manually changed to July 08, 2012.
Then after this event, we manually change the default value to Oct 11 every year.
The July 08 date restricts who can participate in the event.
The Oct 11 event has no restrictions.
I have the following code which works sort of because the restrictions work when someone who doesn't below in any of the 2 groups listed attempts to register for the event.
If txtbef.Text <> "Some04" And txtPre.Text <> "Some7A" Then
lblMessage.Text = "You are not eligible to participate in this election."
I would like to change the code to this:
If (txtEventDate.Text = DateTime.Now.ToString("MMM dd yyyy")) Then 'Check which group registrant belongs to.
If txtbef.Text <> "Some04" And txtbef.Text <> "Some7A" Then 'you cannot participate in this event
lblMessage.Text = "You are not eligible to participate in this event."
Else 'Otherwise, change the default date so everyone can participate. The new date is Oct 11 every year
txtEventDate.Text = DateTime.Now.ToString("MMM dd yyyy")
Basically, we would like to avoid manually toggling the date from default value of Jul 08 to Oct 11 and back.
We would like the dates to change automatically AND to allow everyone to participate when the date is NOT Jul 08 but restrict participants to only the 2 groups indicated in the IF statement if date is Jul 8.
None of the changes we desire is working so far.
Sorry if I am too wordy.
I can clarify if needed.