Codeaddict7423
asked on
asp:checkbox LabelAttributes.Add
Hello,
I have a user control with an asp:checkbox next to a description of a workshop. i'm being asked to program the checkbox so that when a user checks the checkbox, the checkbox control returns the name of the checkbox (in a string format with other than the name of the checkbox) and a string value (other than just "true" or "false" . For example, if checkbox ID="chk_workshop_01", i'm trying to replace the name of this checkbox control to "Workshop One Date:" and if "chk_workshop_01.checked = true" Then replace the value "true" with a string like "April 23, 2010"
I'm trying to work with the labelattributes like this:
chk_workshop_01.LabelAttri butes.Add( "April 23, 2010", "lblWorkshop_01") but I'm not having any success.
All i need is a return from the form is a checkbox control with a string name and a value other than "true" or "false" instead of "true" or "false"
Any help with this is greatly appreciated.
I have a user control with an asp:checkbox next to a description of a workshop. i'm being asked to program the checkbox so that when a user checks the checkbox, the checkbox control returns the name of the checkbox (in a string format with other than the name of the checkbox) and a string value (other than just "true" or "false" . For example, if checkbox ID="chk_workshop_01", i'm trying to replace the name of this checkbox control to "Workshop One Date:" and if "chk_workshop_01.checked = true" Then replace the value "true" with a string like "April 23, 2010"
I'm trying to work with the labelattributes like this:
chk_workshop_01.LabelAttri
All i need is a return from the form is a checkbox control with a string name and a value other than "true" or "false" instead of "true" or "false"
Any help with this is greatly appreciated.
I am not a 100% clear on what you are asking.
Would a label, where the text property changes when your textbox is checked sort you out?
Would a label, where the text property changes when your textbox is checked sort you out?
ASKER
Lotok:
Thanks for the quick reply. I am attempting a new way to tackle my earlier problem of having a checkbox in a user control displayed within a *.aspx page. What I'm trying to do is the following:
A user fills out various textboxes with name, address, email, etc. and checks a checkbox to indicate the name and date of a conference to attend. This checkbox control now gets returned by email with the name of the checkbox (like "chk_workshop_01") and a "true" indicator if cheked or "false" indicator if not checked. What i want is to have this checkbox return by email with a name other than "chk_workshop_01" and an inidcator containing a string like "April 23, 2010" if checked and a blank if not checked. I was thinking that a checkbox property like "labelattributes " might do the trick.
Please help.
Thanks for the quick reply. I am attempting a new way to tackle my earlier problem of having a checkbox in a user control displayed within a *.aspx page. What I'm trying to do is the following:
A user fills out various textboxes with name, address, email, etc. and checks a checkbox to indicate the name and date of a conference to attend. This checkbox control now gets returned by email with the name of the checkbox (like "chk_workshop_01") and a "true" indicator if cheked or "false" indicator if not checked. What i want is to have this checkbox return by email with a name other than "chk_workshop_01" and an inidcator containing a string like "April 23, 2010" if checked and a blank if not checked. I was thinking that a checkbox property like "labelattributes " might do the trick.
Please help.
rather than returning checkbox.id in the email, you could just have something like below amoung the code generating the email. Just return the string in the email.
The other option is to create a custom attribute which attaches a label to the checkbox. If you dont like the code below I can see if I can mock something up like that or point you to a good tutorial (depends if time permits)
The other option is to create a custom attribute which attaches a label to the checkbox. If you dont like the code below I can see if I can mock something up like that or point you to a good tutorial (depends if time permits)
dim x as string = ""
if checkbox1.checked = true then
x = "Chosen Conference: April 23, 2010 "
else
x = "Not Attending"
End If
ASKER
Lotok:
Thank you for the quick reply. unfotunately i don't have access to the code generating the email. is there any way you can think of having this checkbox return something other than the checkbox name and "true"/"false"? i have to have something working to show today.
Thank you for the quick reply. unfotunately i don't have access to the code generating the email. is there any way you can think of having this checkbox return something other than the checkbox name and "true"/"false"? i have to have something working to show today.
Checkboxes do have a text property which is usually used to show the end user what they are for.
for example you could change "Tick Here for Event" to "Chosen Conference: April 23, 2010 "
You cant change the variable name and the boolean value has to be a boolean so there is no point changing that. The .text option is your best bet.
for example you could change "Tick Here for Event" to "Chosen Conference: April 23, 2010 "
You cant change the variable name and the boolean value has to be a boolean so there is no point changing that. The .text option is your best bet.
chk_workshop_01.text = "Chosen Conference: April 23, 2010 "
Can you clarify for me, the email being generated by 3rd party code just provides the variable name? or is it the control ID? as well as the boolean value...
Do you have even have access to other properties of the control?
If you were really struggling, chk_workshop_01.ID = "Chosen Conference: April 23, 2010 " * might* work.
I am not sure if it will like havign the ID changed at runtime.
Do you have even have access to other properties of the control?
If you were really struggling, chk_workshop_01.ID = "Chosen Conference: April 23, 2010 " * might* work.
I am not sure if it will like havign the ID changed at runtime.
ASKER
Lotok:
Thank you. I tried your suggested text change and did display on the form but returned only the name of the control (chk_workshop_1) and a "true" next to the id. I've been able to pass a value to a label and display that well. Is there any way to have a checkbox, when checked, return somethign other than "true" or "false" or maybe return a blank?
Thank you. I tried your suggested text change and did display on the form but returned only the name of the control (chk_workshop_1) and a "true" next to the id. I've been able to pass a value to a label and display that well. Is there any way to have a checkbox, when checked, return somethign other than "true" or "false" or maybe return a blank?
No, the checkbox control returns a boolean.
What is returning the checkbox name? A 3rd party piece of code for which you dont have the source?
You can trying changing the ID at runtime, other than that, are you really stuck with a checkbox or can you change it to a DDL? a drop down list could have attending/not attening as the text shown on the page and then the date or blank as a value. It would seem to fit your needs better.
What is returning the checkbox name? A 3rd party piece of code for which you dont have the source?
You can trying changing the ID at runtime, other than that, are you really stuck with a checkbox or can you change it to a DDL? a drop down list could have attending/not attening as the text shown on the page and then the date or blank as a value. It would seem to fit your needs better.
ASKER
Lotok:
Thanks for your help. i'm getting there... you mentioned ch anging the checkbox ID at run time. Is there a way to replace a checkbox ID of something like " <asp:CheckBox ID="Workshop_One_Date" runat="server" AutoPostBack="true" OnCheckedChanged="CheckBox 1_CheckedC hanged" Text="Chosen Conference: April 23, 2010 " />
when Workshop_One_Date.checked replace Replace("_", " ")
VS indicates that "replace" is not a member of checkbox. do you know a workaround?
Thanks for your help. i'm getting there... you mentioned ch anging the checkbox ID at run time. Is there a way to replace a checkbox ID of something like " <asp:CheckBox ID="Workshop_One_Date" runat="server" AutoPostBack="true" OnCheckedChanged="CheckBox
when Workshop_One_Date.checked replace Replace("_", " ")
VS indicates that "replace" is not a member of checkbox. do you know a workaround?
ASKER
Lotok:
I came across this article and tought perhaps we could devise a solution to my checkbox issue.
http://forums.asp.net/p/1050481/3774639.aspx#3774639
It seems that checkbox controls are rendered at runtime surrounded by a <span> tag and that this tag also creates a label based on the UniqueID (checkbox id) of the control. I'm trying to find a way to access and change this <label> </label> tag to add my own string instead of the checkboxID
thanks,
I came across this article and tought perhaps we could devise a solution to my checkbox issue.
http://forums.asp.net/p/1050481/3774639.aspx#3774639
It seems that checkbox controls are rendered at runtime surrounded by a <span> tag and that this tag also creates a label based on the UniqueID (checkbox id) of the control. I'm trying to find a way to access and change this <label> </label> tag to add my own string instead of the checkboxID
thanks,
Try this
****MARKUP****
<asp:CheckBox ID="Workshop_One_Date" runat="server" AutoPostBack="true" Text="Chosen Conference: April 23, 2010" />
****CODE BEHIND****
Protected Sub Workshop_One_Date_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Workshop_One_Date.CheckedChanged
If Workshop_One_Date.Checked = True Then
Workshop_One_Date.ID = "chkWorkShopOneChecked"
Else
Workshop_One_Date.ID = "chkWorkShopOneNotChecked"
End If
End Sub
ASKER
Lotok:
thank you for your suggestion. I tried it several times however, the ID of the checkbox is the only item returned. I have a solution for a dropdown box but i'm being asked to create a checkbox solution that identifies the checkbox (but not with the checkbox ID) and its value (not "true" or "false" but with a date string). I'm nearing the end of my time to have this. Can you think of any solution, even if it's to replace the "true" or "false" with a string?
Thanks,
thank you for your suggestion. I tried it several times however, the ID of the checkbox is the only item returned. I have a solution for a dropdown box but i'm being asked to create a checkbox solution that identifies the checkbox (but not with the checkbox ID) and its value (not "true" or "false" but with a date string). I'm nearing the end of my time to have this. Can you think of any solution, even if it's to replace the "true" or "false" with a string?
Thanks,
You cant replace the true or false with a string, it's a boolean value.
Changing the ID like my previous example works. So they dont want to ID changed now?
If you dont have access to the email source, so you cant just insert a string or have the checkbox control a label.
They dont want to use the returned control ID as a method of returning the string
They dont want to change the control away from checkbox
They dont want to use the checkbox text property
It sounds like the only solution they want is to change the true or false value to a string which cannot be done. If they are willing to have something else done please clarify, but it seems like a no goer.
Changing the ID like my previous example works. So they dont want to ID changed now?
If you dont have access to the email source, so you cant just insert a string or have the checkbox control a label.
They dont want to use the returned control ID as a method of returning the string
They dont want to change the control away from checkbox
They dont want to use the checkbox text property
It sounds like the only solution they want is to change the true or false value to a string which cannot be done. If they are willing to have something else done please clarify, but it seems like a no goer.
ASKER
Lotok:
thank you, having that response gives me a little cover when explaining progress...
I was thinking of a possible compromise. I was able to pass the value of a string to a label. that seems to work.
My question now is this: is there a way to not display the "true" or "false" when the checkbox is checked. I can handle the reply with a label.text="string" for true or false, but is there a way to hide the "true" / "false" reply?
thank you, having that response gives me a little cover when explaining progress...
I was thinking of a possible compromise. I was able to pass the value of a string to a label. that seems to work.
My question now is this: is there a way to not display the "true" or "false" when the checkbox is checked. I can handle the reply with a label.text="string" for true or false, but is there a way to hide the "true" / "false" reply?
The only way the true or false is showing is if the source of the page is set to display it.
Before you said you couldn't use a label, but now you have been allowed. From that I take it that you have access to the source but have limited permission to change it?
Can you post some of the source code? That way I can see where the checkbox details are being shown and advise you how to prevent it. It will somewhere be showing the result of checkbox.checked to display the true or false..
I will be able to see better if you can provide code.
Before you said you couldn't use a label, but now you have been allowed. From that I take it that you have access to the source but have limited permission to change it?
Can you post some of the source code? That way I can see where the checkbox details are being shown and advise you how to prevent it. It will somewhere be showing the result of checkbox.checked to display the true or false..
I will be able to see better if you can provide code.
ASKER
Lotok:
Below, please find my code:
---------
<%@ Control Language="VB" ClassName="RSVP_FEMAnopayc hkbox" %>
<script runat="server">
Protected Sub RSVPForm1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If (Not IsPostBack) Then
'Dim dd As ListBox
'dd = RSVPForm1.FindControl("Dat eOfWorksho p")
'Dim cb As CheckBox
'Dim lblWorkshop_01 As New Label
'Dim lbl_workhop_one As New Label
' Dim Date_of_First_Workshop As TextBox = CType(RSVPForm1.FindContro l("Date_of _First_Wor kshop"), TextBox)
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro l("lblWork shop_01"), Label)
'Date_of_First_Workshop.Vi sible = "false"
lblWorkshop_01.Visible = "false"
'Dim Date_of_Second_Workshop As TextBox = CType(RSVPForm1.FindContro l("Date_of _Second_Wo rkshop"), TextBox)
Dim lblWorkshop_02 As Label = CType(RSVPForm1.FindContro l("lblWork shop_02"), Label)
'Date_of_Second_Workshop.V isible = "false"
lblWorkshop_02.Visible = "false"
Dim Workshop_One_Date As New CheckBox
Workshop_One_Date.LabelAtt ributes.Ad d("Date of Workshop", "April 23, 2010")
Dim Workshop_Two_Date As New CheckBox
Workshop_Two_Date.LabelAtt ributes.Ad d("Date of Workshop", "May 11, 2010")
End If
End Sub
</script>
<script runat="server">
Protected Sub CheckBox1_CheckedChanged(B yVal sender As Object, ByVal e As System.EventArgs)
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro l("Worksho p_One_Date "), CheckBox)
' Dim Date_of_First_Workshop As TextBox = CType(RSVPForm1.FindContro l("Date_of _First_Wor kshop"), TextBox)
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro l("lblWork shop_01"), Label)
lblWorkshop_01.Visible = "false"
'Dim strWorkshop_One_Date As String
'strWorkshop_One_Date = Workshop_One_Date.ID()
'Dim strDate_of_First_Workshop As String
'strDate_of_First_Workshop = Workshop_One_Date.ID()
If Workshop_One_Date.Checked = True Then
'Workshop_One_Date.LabelAt tributes.A dd("April 23, 2010", "Workshop One Date")
'Workshop_One_Date.Checked .ToString( )
'Workshop_One_Date.InputAt tributes.A dd("April 23, 2010", "Workshop One Date")
lblWorkshop_01.Visible = "true"
'lblWorkshop_01.Text = "Date of Workshop: April 23, 2010" & Workshop_One_Date.Checked. ToString()
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
Workshop_One_Date.ID = "Date of Workshop One: April 23, 2010"
' Workshop_One_Date.ID = "Date of Workshop One: April 23, 2010"
'Date_of_First_Workshop.Te xt = "April 23, 2010"
'Date_of_First_Workshop.Vi sible = "true"
Else
Workshop_One_Date.Text = " "
' Date_of_First_Workshop.Tex t = ""
lblWorkshop_01.Visible = "false"
End If
End Sub
</script>
<script runat="server">
Protected Sub CheckBox2_CheckedChanged(B yVal sender As Object, ByVal e As System.EventArgs)
Dim Workshop_Two_Date As CheckBox = CType(RSVPForm1.FindContro l("Worksho p_Two_Date "), CheckBox)
Dim lblWorkshop_02 As Label = CType(RSVPForm1.FindContro l("lblWork shop_02"), Label)
lblWorkshop_02.Visible = "false"
If Workshop_Two_Date.Checked = True Then
lblWorkshop_02.Visible = "true"
'lblWorkshop_02.Text = "Date of Workshop: May 11, 2010" & Workshop_Two_Date.Checked. ToString()
lblWorkshop_02.Text = "Date of Workshop: May 11, 2010"
'Date_of_Second_Workshop.T ext = "May 11, 2010"
'Date_of_Second_Workshop.V isible = "true"
lblWorkshop_02.Visible = "true"
Else
Workshop_Two_Date.Text = " "
' Date_of_Second_Workshop.Te xt = ""
lblWorkshop_02.Visible = "false"
End If
End Sub
</script>
<HGACServerControls:RSVPFo rm ID="RSVPForm1" runat="server" RSVPContactEmail="luis.her nandez@h-g ac.com" OnLoad="RSVPForm1_Load" RSVPCode="FEMA Workshop Registration Form" Width="530px" RSVPAmount="25.00" RSVPFinancialCode="0000-00 0" RSVPExpireDate="05/31/2010 " >
<AdditionalFormControls>
<p style="font-size: x-small; color: red; text-align: center"><br /><br />
* denotes required fields. <br /></p>
<table width="620" cellpadding="0" cellspacing="0" style="border-color:blue" border="0">
<tr>
<td colspan="4" style="width:100%" valign="top" align="left"><strong><span
style="color:crimson">Cont act Information</span></strong ><br /></td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center">   ; </td>
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label2"
runat="server" AssociatedControlID="tbFNa me" Text="First Name:"></asp:Label> & nbsp;</td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbFName" runat="server" Width="190px"></asp:TextBo x></span>< /td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re quiredFiel dValidator ID="RequiredFieldValidator 1"
runat="server" ControlToValidate="tbFName " Display="Dynamic" ErrorMessage="First Name is
required" EnableClientScript="true" SetFocusOnError="true"></a sp:Require dFieldVali dator>
</td></tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label1"
runat="server" AssociatedControlID="tbLNa me" Text="Last Name:"></asp:Label> & nbsp;</td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbLName" runat="server" Width="190px"></asp:TextBo x></span>< /td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re quiredFiel dValidator ID="RequiredFieldValidator 9"
runat="server" ControlToValidate="tbLName " Display="Dynamic" ErrorMessage="Last Name is
required" EnableClientScript="true" SetFocusOnError="true"></a sp:Require dFieldVali dator>
</td></tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label6"
runat="server" AssociatedControlID="tbTit le" Text="Title:"></asp:Label> </td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbTitle" runat="server" Width="190px"></asp:TextBo x> </span> </td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"> </td>
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label3"
runat="server" AssociatedControlID="tbOrg anization"
Text="Organization:"></asp :Label>&nb sp; < /td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbOrganization" runat="server" Width="190px"></asp:TextBo x></span>< /td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re quiredFiel dValidator ID="RequiredFieldValidator 2"
runat="server" ControlToValidate="tbOrgan ization" ErrorMessage="Organization is required"
Display="Dynamic" EnableClientScript="true"
SetFocusOnError="true"></a sp:Require dFieldVali dator></td ></tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label100"
runat="server" AssociatedControlID="tbAdd res" Text="Address:"></asp:Labe l> </td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbAddres" runat="server" Width="190px"></asp:TextBo x></span> </td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re quiredFiel dValidator ID="RequiredFieldValidator 5"
runat="server" ControlToValidate="tbAddre s" ErrorMessage="Address is required" Display="Dynamic"
EnableClientScript="true" SetFocusOnError="true"></a sp:Require dFieldVali dator></td >
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label8"
runat="server" AssociatedControlID="tbCit y" Text="City:"></asp:Label> </td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbCity" runat="server" Width="190px"></asp:TextBo x> </span> </td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re quiredFiel dValidator ID="RequiredFieldValidator 6"
runat="server" ControlToValidate="tbCity" Display="Dynamic" ErrorMessage="City is required"
EnableClientScript="true" SetFocusOnError="true"></a sp:Require dFieldVali dator> </td>
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label9"
runat="server" AssociatedControlID="tbSta te" Text="State:"></asp:Label> </td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbState" runat="server" Width="190px"></asp:TextBo x> </span> </td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re quiredFiel dValidator ID="RequiredFieldValidator 7"
runat="server" ControlToValidate="tbState " Display="Dynamic" ErrorMessage="State is required"
EnableClientScript="true" SetFocusOnError="true"></a sp:Require dFieldVali dator> </td>
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label10"
runat="server" AssociatedControlID="tbZip " Text="Zip Code:"></asp:Label> </td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox ID="tbZip"
runat="server" Width="190px"></asp:TextBo x> </span> </td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re quiredFiel dValidator ID="RequiredFieldValidator 8"
runat="server" ControlToValidate="tbZip" ErrorMessage="Zip Code is required" Display="Dynamic"
EnableClientScript="true" SetFocusOnError="true"></a sp:Require dFieldVali dator> </td>
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label5"
runat="server" AssociatedControlID="tbPho ne" Text="Phone #:"></asp:Label> &nbs p;</td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox ID="tbPhone"
runat="server" Width="190px"></asp:TextBo x></span> </td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span style="color:
red">*</span> <asp:Re quiredFiel dValidator ID="RequiredFieldValidator 4" runat="server"
ControlToValidate="tbPhone " ErrorMessage="Phone is required" Display="Dynamic"
EnableClientScript="true" SetFocusOnError="true"></a sp:Require dFieldVali dator></td ></tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label11"
runat="server" AssociatedControlID="tbCel lPhone" Text="Cell Phone #:"></asp:Label> </td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbCellPhone" runat="server" Width="190px"></asp:TextBo x> </span> </td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"> </td>
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label4"
runat="server" AssociatedControlID="tbEma il" Text="Email:"></asp:Label> &nbs p;</td>
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox ID="tbEmail"
runat="server" Width="190px"></asp:TextBo x></span>< /td>
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span style="color:
red">*</span> <asp:Re quiredFiel dValidator ID="RequiredFieldValidator 13" runat="server"
ControlToValidate="tbEmail " ErrorMessage="Email is required" Display="Dynamic"
EnableClientScript="true" SetFocusOnError="true"></a sp:Require dFieldVali dator>
<asp:RegularExpressionVali dator ID="RegularExpressionValid ator1" runat="server"
ControlToValidate="tbEmail "
ValidationExpression="^[a- zA-Z][\w\. -]*[a-zA-Z 0-9]@[a-zA -Z0-9][\w\ .-]*[a-zA- Z0-9]\.[a- zA-Z][a-zA
-Z\.]*[a-zA-Z]$" Display="Dynamic" ErrorMessage="Enter Valid
e-mail"></asp:RegularExpre ssionValid ator>
</td></tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center"> </td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center"><hr /> </td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center"> </td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="left"><strong><span
style="color:crimson">Work shop Information</span></strong ><br /> </td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center">   ; </td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%">
</td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan>
<table cellpadding="0" cellspacing="0" style="border-color:gray" border="0">
<tr>
<td>
<rsvpcheckbox>
<span>
<HGACServerControls:RSVPCh eckBoxCont rol ID="DateofWorkshopOne" runat="server" QuantityText="Admit One" ChargeAmount="25.00" BackColor="Bisque" Font-Size="X-Small" ToolTip="Click to Select This Date " Enabled="true" Text="Workshop One Date: April 23, 2010" CheckBoxLabel="Workshop One Selected" />
</span>
</rsvpcheckbox>
<asp:CheckBox ID="Workshop_One_Date" runat="server" AutoPostBack="false" OnCheckedChanged="CheckBox 1_CheckedC hanged" Text=" " />
<asp:Label ID="lblWorkshop_01" runat="server" AssociatedControlID="Works hop_One_Da te" Text=" " BackColor="Gray"></asp:Lab el>
</td>
<td>
</td>
</tr>
</table>
</span>
</td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Wor kshop 1: </span> </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="color:#4b8a08; font-size:11px">Local Official’s Guide to
Coastal Construction</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Dat e: &n bsp;</span > </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="color:#08088a; font-size:11px">Friday, April 23,
2010</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Tim e: &n bsp;</span > </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="font-size:11px">8:0 0 am – 5:00 pm</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Loc ation:&nbs p; </ span> </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="font-size:11px"><a class="null" title="Directions Community
Resource Center" href="http://www.unitedwayhouston.org/default/pdfs/uw_directions.pdf">United
Way<br />Community Resource Center</a><br />
50 Waugh Drive<br />
Houston, TX 77007</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Cos t: &n bsp;</span > </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="font-size:11px">The re is no fee for this
workshop.</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">&nb sp; < /span> </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="font-size:11px">&nb sp; </span></td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center"><hr /> </td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%">
</td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan>
<table cellpadding="0" cellspacing="0" style="border-color:gray" border="0">
<tr>
<td>
<rsvpcheckbox>
<span>
<HGACServerControls:RSVPCh eckBoxCont rol ID="DateofWorkshopTwo" runat="server" QuantityText="Admit One" ChargeAmount="25.00" BackColor="Bisque" Font-Size="X-Small" ToolTip="Click to Select This Date " Enabled="true" Text="Workshop One Date: May 11, 2010" />
</span>
</rsvpcheckbox>
<br />
<asp:CheckBox ID="Workshop_Two_Date" runat="server" AutoPostBack="false" OnCheckedChanged="CheckBox 2_CheckedC hanged" />
<asp:Label ID="lblWorkshop_02" runat="server" AssociatedControlID="Works hop_Two_Da te" Text=" " BackColor="Gray"></asp:Lab el>
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Wor kshop 2: </span> </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="color:#4b8a08; font-size:11px">Coastal Construction
Workshop for Homebuilders and <br />
Introduction to Coastal Foundation Design and Construction for Local Officials
</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Dat e: &n bsp;</span > </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="color:#08088a; font-size:11px">Tuesday, May 11,
2010</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Tim e: &n bsp;</span > </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="font-size:11px">8:0 0 am – 5:00 pm</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Loc ation:&nbs p; </ span> </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="font-size:11px"><a class="null" title="Directions to H-GAC"
href="http://www.h-gac.com/contact/Map/default.aspx">Houston-Galveston Area Council</a><br />
3555 Timmons Lane</a><br />
2nd Floor Conference Room A, Suite 120<br />
Houston, TX 77027</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Cos t: &n bsp;</span > </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="font-size:11px">The re is no fee for this
workshop.</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">&nb sp; < /span> </td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s pan style="font-size:11px">&nb sp; </span></td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center"><hr /> </td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center">   ; </td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%">
<asp:Label ID="Label7" runat="server" Text="Your Comments: "
AssociatedControlID="tbCom ments"></a sp:Label>< /td>
<td colspan="3" style="text-align: left; width: 70%"><span>
<asp:TextBox ID="tbComments" runat="server" TextMode="MultiLine" Height="80"
Width="90%"></asp:TextBox>
</td>
</tr>
</table>
</AdditionalFormControls>
</HGACServerControls:RSVPF orm>
------------
Thank you for your help.
Below, please find my code:
---------
<%@ Control Language="VB" ClassName="RSVP_FEMAnopayc
<script runat="server">
Protected Sub RSVPForm1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If (Not IsPostBack) Then
'Dim dd As ListBox
'dd = RSVPForm1.FindControl("Dat
'Dim cb As CheckBox
'Dim lblWorkshop_01 As New Label
'Dim lbl_workhop_one As New Label
' Dim Date_of_First_Workshop As TextBox = CType(RSVPForm1.FindContro
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro
'Date_of_First_Workshop.Vi
lblWorkshop_01.Visible = "false"
'Dim Date_of_Second_Workshop As TextBox = CType(RSVPForm1.FindContro
Dim lblWorkshop_02 As Label = CType(RSVPForm1.FindContro
'Date_of_Second_Workshop.V
lblWorkshop_02.Visible = "false"
Dim Workshop_One_Date As New CheckBox
Workshop_One_Date.LabelAtt
Dim Workshop_Two_Date As New CheckBox
Workshop_Two_Date.LabelAtt
End If
End Sub
</script>
<script runat="server">
Protected Sub CheckBox1_CheckedChanged(B
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro
' Dim Date_of_First_Workshop As TextBox = CType(RSVPForm1.FindContro
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro
lblWorkshop_01.Visible = "false"
'Dim strWorkshop_One_Date As String
'strWorkshop_One_Date = Workshop_One_Date.ID()
'Dim strDate_of_First_Workshop As String
'strDate_of_First_Workshop
If Workshop_One_Date.Checked = True Then
'Workshop_One_Date.LabelAt
'Workshop_One_Date.Checked
'Workshop_One_Date.InputAt
lblWorkshop_01.Visible = "true"
'lblWorkshop_01.Text = "Date of Workshop: April 23, 2010" & Workshop_One_Date.Checked.
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
Workshop_One_Date.ID = "Date of Workshop One: April 23, 2010"
' Workshop_One_Date.ID = "Date of Workshop One: April 23, 2010"
'Date_of_First_Workshop.Te
'Date_of_First_Workshop.Vi
Else
Workshop_One_Date.Text = " "
' Date_of_First_Workshop.Tex
lblWorkshop_01.Visible = "false"
End If
End Sub
</script>
<script runat="server">
Protected Sub CheckBox2_CheckedChanged(B
Dim Workshop_Two_Date As CheckBox = CType(RSVPForm1.FindContro
Dim lblWorkshop_02 As Label = CType(RSVPForm1.FindContro
lblWorkshop_02.Visible = "false"
If Workshop_Two_Date.Checked = True Then
lblWorkshop_02.Visible = "true"
'lblWorkshop_02.Text = "Date of Workshop: May 11, 2010" & Workshop_Two_Date.Checked.
lblWorkshop_02.Text = "Date of Workshop: May 11, 2010"
'Date_of_Second_Workshop.T
'Date_of_Second_Workshop.V
lblWorkshop_02.Visible = "true"
Else
Workshop_Two_Date.Text = " "
' Date_of_Second_Workshop.Te
lblWorkshop_02.Visible = "false"
End If
End Sub
</script>
<HGACServerControls:RSVPFo
<AdditionalFormControls>
<p style="font-size: x-small; color: red; text-align: center"><br /><br />
* denotes required fields. <br /></p>
<table width="620" cellpadding="0" cellspacing="0" style="border-color:blue" border="0">
<tr>
<td colspan="4" style="width:100%" valign="top" align="left"><strong><span
style="color:crimson">Cont
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center">  
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label2"
runat="server" AssociatedControlID="tbFNa
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbFName" runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re
runat="server" ControlToValidate="tbFName
required" EnableClientScript="true" SetFocusOnError="true"></a
</td></tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label1"
runat="server" AssociatedControlID="tbLNa
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbLName" runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re
runat="server" ControlToValidate="tbLName
required" EnableClientScript="true" SetFocusOnError="true"></a
</td></tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label6"
runat="server" AssociatedControlID="tbTit
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbTitle" runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"> </td>
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label3"
runat="server" AssociatedControlID="tbOrg
Text="Organization:"></asp
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbOrganization" runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re
runat="server" ControlToValidate="tbOrgan
Display="Dynamic" EnableClientScript="true"
SetFocusOnError="true"></a
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label100"
runat="server" AssociatedControlID="tbAdd
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbAddres" runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re
runat="server" ControlToValidate="tbAddre
EnableClientScript="true" SetFocusOnError="true"></a
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label8"
runat="server" AssociatedControlID="tbCit
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbCity" runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re
runat="server" ControlToValidate="tbCity"
EnableClientScript="true" SetFocusOnError="true"></a
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label9"
runat="server" AssociatedControlID="tbSta
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbState" runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re
runat="server" ControlToValidate="tbState
EnableClientScript="true" SetFocusOnError="true"></a
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label10"
runat="server" AssociatedControlID="tbZip
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox ID="tbZip"
runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span
style="color: red">*</span> <asp:Re
runat="server" ControlToValidate="tbZip" ErrorMessage="Zip Code is required" Display="Dynamic"
EnableClientScript="true" SetFocusOnError="true"></a
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label5"
runat="server" AssociatedControlID="tbPho
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox ID="tbPhone"
runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span style="color:
red">*</span> <asp:Re
ControlToValidate="tbPhone
EnableClientScript="true" SetFocusOnError="true"></a
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label11"
runat="server" AssociatedControlID="tbCel
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox
ID="tbCellPhone" runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"> </td>
</tr>
<tr>
<td style="text-align: right; white-space: nowrap; width: 30%"><asp:Label ID="Label4"
runat="server" AssociatedControlID="tbEma
<td style="text-align: left; white-space: nowrap; width: 25%"><span><asp:TextBox ID="tbEmail"
runat="server" Width="190px"></asp:TextBo
<td colspan="2" style="text-align: left; white-space: nowrap; width: 20%"><span style="color:
red">*</span> <asp:Re
ControlToValidate="tbEmail
EnableClientScript="true" SetFocusOnError="true"></a
<asp:RegularExpressionVali
ControlToValidate="tbEmail
ValidationExpression="^[a-
-Z\.]*[a-zA-Z]$" Display="Dynamic" ErrorMessage="Enter Valid
e-mail"></asp:RegularExpre
</td></tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center"> </td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center"><hr /> </td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center"> </td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="left"><strong><span
style="color:crimson">Work
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center">  
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%">
</td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
<table cellpadding="0" cellspacing="0" style="border-color:gray" border="0">
<tr>
<td>
<rsvpcheckbox>
<span>
<HGACServerControls:RSVPCh
</span>
</rsvpcheckbox>
<asp:CheckBox ID="Workshop_One_Date" runat="server" AutoPostBack="false" OnCheckedChanged="CheckBox
<asp:Label ID="lblWorkshop_01" runat="server" AssociatedControlID="Works
</td>
<td>
</td>
</tr>
</table>
</span>
</td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Wor
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
Coastal Construction</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Dat
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
2010</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Tim
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Loc
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
Resource Center" href="http://www.unitedwayhouston.org/default/pdfs/uw_directions.pdf">United
Way<br />Community Resource Center</a><br />
50 Waugh Drive<br />
Houston, TX 77007</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Cos
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
workshop.</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">&nb
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center"><hr /> </td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%">
</td>
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
<table cellpadding="0" cellspacing="0" style="border-color:gray" border="0">
<tr>
<td>
<rsvpcheckbox>
<span>
<HGACServerControls:RSVPCh
</span>
</rsvpcheckbox>
<br />
<asp:CheckBox ID="Workshop_Two_Date" runat="server" AutoPostBack="false" OnCheckedChanged="CheckBox
<asp:Label ID="lblWorkshop_02" runat="server" AssociatedControlID="Works
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Wor
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
Workshop for Homebuilders and <br />
Introduction to Coastal Foundation Design and Construction for Local Officials
</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Dat
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
2010</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Tim
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Loc
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
href="http://www.h-gac.com/contact/Map/default.aspx">Houston-Galveston Area Council</a><br />
3555 Timmons Lane</a><br />
2nd Floor Conference Room A, Suite 120<br />
Houston, TX 77027</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">Cos
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
workshop.</span></td>
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%"><span
style="font-size:11px">&nb
<td colspan="3" style="text-align: left; vertical-align:top; width: 70%;
background-color:white"><s
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center"><hr /> </td>
</tr>
<tr>
<td colspan="4" style="width:100%" valign="top" align="center">  
</tr>
<tr>
<td style="text-align: right; vertical-align:top; white-space: nowrap; width: 30%">
<asp:Label ID="Label7" runat="server" Text="Your Comments: "
AssociatedControlID="tbCom
<td colspan="3" style="text-align: left; width: 70%"><span>
<asp:TextBox ID="tbComments" runat="server" TextMode="MultiLine" Height="80"
Width="90%"></asp:TextBox>
</td>
</tr>
</table>
</AdditionalFormControls>
</HGACServerControls:RSVPF
------------
Thank you for your help.
Can you clarify from the above which markup/code controls the email being sent? Which controls and code belongs to that email?
I am trying to work out from your code what is preventing you just creating a label and putting the dates etc on there and where the code is saying what information the email shows. Such as the true or false output.
I am trying to work out from your code what is preventing you just creating a label and putting the dates etc on there and where the code is saying what information the email shows. Such as the true or false output.
ASKER
Lotok:
I got a solution working. I stripped away the old code and replaced with a clean copy of your suggestion for changing the ID of the checkbox and it worked. Now the return is like this:
--------
First Name: test-33_luis
Last Name: test-33_hernandez
Title: test-33_test
Organization: test-33_hgac
Address: test-33_3555 TIMMONS
City: test-33_houston
State: test-33_tx
Zip Code: test-33_77027
Phone #: 7136547879
Cell Phone #: 7136541454
Email: luis.hernandez@h-gac.com
Date of Workshop Selected: April 23, 2010: True
Date of Workshop Selected: May 11, 2010: True
Your Comments: : test-33_this is fema test with both checkboxes ids changed to string stating the date of the workshop selected.
-------
I'm happy with the return. however, if i remember right, you're telling me that the "true" or "false" return can't be changed. Is that correct?
I got a solution working. I stripped away the old code and replaced with a clean copy of your suggestion for changing the ID of the checkbox and it worked. Now the return is like this:
--------
First Name: test-33_luis
Last Name: test-33_hernandez
Title: test-33_test
Organization: test-33_hgac
Address: test-33_3555 TIMMONS
City: test-33_houston
State: test-33_tx
Zip Code: test-33_77027
Phone #: 7136547879
Cell Phone #: 7136541454
Email: luis.hernandez@h-gac.com
Date of Workshop Selected: April 23, 2010: True
Date of Workshop Selected: May 11, 2010: True
Your Comments: : test-33_this is fema test with both checkboxes ids changed to string stating the date of the workshop selected.
-------
I'm happy with the return. however, if i remember right, you're telling me that the "true" or "false" return can't be changed. Is that correct?
ASKER
Lotok:
I'm almost there.... the code you suggested is working when checkbox is selected but when not selected it returns only a "false". can you please review my code:
---------
<script runat="server">
Protected Sub CheckBox1_CheckedChanged(B yVal sender As Object, ByVal e As System.EventArgs)
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro l("Worksho p_One_Date "), CheckBox)
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro l("lblWork shop_01"), Label)
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
'Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
Else
Workshop_One_Date.Text = "Not Selected "
lblWorkshop_01.Visible = "false"
lblWorkshop_01.Text = "Date of Workshop Not Selected: April 23, 2010"
'Workshop_One_Date.Visible = "false"
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
End If
End Sub
</script>
-----------
I'm almost there.... the code you suggested is working when checkbox is selected but when not selected it returns only a "false". can you please review my code:
---------
<script runat="server">
Protected Sub CheckBox1_CheckedChanged(B
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
'Workshop_One_Date.Visible
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
Else
Workshop_One_Date.Text = "Not Selected "
lblWorkshop_01.Visible = "false"
lblWorkshop_01.Text = "Date of Workshop Not Selected: April 23, 2010"
'Workshop_One_Date.Visible
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
End If
End Sub
</script>
-----------
Try this. You had the id being changed to the same thing regardless of the true or false outcome.
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindControl("Workshop_One_Date"), CheckBox)
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindControl("lblWorkshop_01"), Label)
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
'Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
Else
Workshop_One_Date.Text = "Not Selected "
lblWorkshop_01.Visible = "false"
lblWorkshop_01.Text = "Date of Workshop Not Selected: April 23, 2010"
'Workshop_One_Date.Visible = "false"
Workshop_One_Date.ID = "Not Selected "
End If
Oh just noticed you also did this:
'Workshop_One_Date.Visible = "false"
if you hide the control completely there will be nothing to show, the control needs to be visible.
You will want
'Workshop_One_Date.Visible = "True"
'Workshop_One_Date.Visible
if you hide the control completely there will be nothing to show, the control needs to be visible.
You will want
'Workshop_One_Date.Visible
ASKER
Lotok:
Thank you for the quck catch.
When i do not select the first checkbox, i get a "Label: false".... below is my sub with your suggestion
-----------
Protected Sub CheckBox1_CheckedChanged(B yVal sender As Object, ByVal e As System.EventArgs)
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro l("Worksho p_One_Date "), CheckBox)
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro l("lblWork shop_01"), Label)
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
'Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
Else
Workshop_One_Date.Text = "Not Selected "
lblWorkshop_01.Visible = "false"
lblWorkshop_01.Text = "Date of Workshop Not Selected: April 23, 2010"
Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Not Selected "
End If
End Sub
---------
Thank you for the quck catch.
When i do not select the first checkbox, i get a "Label: false".... below is my sub with your suggestion
-----------
Protected Sub CheckBox1_CheckedChanged(B
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
'Workshop_One_Date.Visible
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
Else
Workshop_One_Date.Text = "Not Selected "
lblWorkshop_01.Visible = "false"
lblWorkshop_01.Text = "Date of Workshop Not Selected: April 23, 2010"
Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Not Selected "
End If
End Sub
---------
Post the form output like you did above, showing test info
ASKER
Lotok:
here's the form output:
-------
First Name: test-43_luis
Last Name: test-43_hernandez
Title: test-43_test
Organization: test-43_hgac
Address: test-43_3555
City: test-43_houston
State: test-43_tx
Zip Code: test-43_77027
Phone #: 7136547987
Cell Phone #: 713654797
Email: luis.hernandez@h-gac.com
Label: False
Date of Workshop Selected: May 11, 2010: True
Your Comments: : test-43_april 23 not selected and may 11 selected
---------
here's the form output:
-------
First Name: test-43_luis
Last Name: test-43_hernandez
Title: test-43_test
Organization: test-43_hgac
Address: test-43_3555
City: test-43_houston
State: test-43_tx
Zip Code: test-43_77027
Phone #: 7136547987
Cell Phone #: 713654797
Email: luis.hernandez@h-gac.com
Label: False
Date of Workshop Selected: May 11, 2010: True
Your Comments: : test-43_april 23 not selected and may 11 selected
---------
ASKER
Lotok:
I cleaned my subs and thought i'd post those for your review.
------
<script runat="server">
Protected Sub CheckBox1_CheckedChanged(B yVal sender As Object, ByVal e As System.EventArgs)
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro l("Worksho p_One_Date "), CheckBox)
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro l("lblWork shop_01"), Label)
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
'Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
Else
Workshop_One_Date.Text = "Not Selected "
lblWorkshop_01.Visible = "false"
lblWorkshop_01.Text = "Date of Workshop Not Selected: April 23, 2010"
Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Not Selected "
End If
End Sub
</script>
<script runat="server">
Protected Sub CheckBox2_CheckedChanged(B yVal sender As Object, ByVal e As System.EventArgs)
Dim Workshop_Two_Date As CheckBox = CType(RSVPForm1.FindContro l("Worksho p_Two_Date "), CheckBox)
Dim lblWorkshop_02 As Label = CType(RSVPForm1.FindContro l("lblWork shop_02"), Label)
lblWorkshop_02.Visible = "false"
If Workshop_Two_Date.Checked = True Then
lblWorkshop_02.Visible = "true"
lblWorkshop_02.Text = "Date of Workshop: May 11, 2010"
'Workshop_Two_Date.Visible = "true"
Workshop_Two_Date.ID = "Date of Workshop Selected: May 11, 2010"
Else
Workshop_Two_Date.Text = "Not Selected "
lblWorkshop_02.Visible = "false"
lblWorkshop_02.Text = "Date of Workshop Not Selected: May 11, 2010"
Workshop_Two_Date.Visible = "true"
Workshop_Two_Date.ID = "Not Selected"
End If
End Sub
</script>
-------
I cleaned my subs and thought i'd post those for your review.
------
<script runat="server">
Protected Sub CheckBox1_CheckedChanged(B
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
'Workshop_One_Date.Visible
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
Else
Workshop_One_Date.Text = "Not Selected "
lblWorkshop_01.Visible = "false"
lblWorkshop_01.Text = "Date of Workshop Not Selected: April 23, 2010"
Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Not Selected "
End If
End Sub
</script>
<script runat="server">
Protected Sub CheckBox2_CheckedChanged(B
Dim Workshop_Two_Date As CheckBox = CType(RSVPForm1.FindContro
Dim lblWorkshop_02 As Label = CType(RSVPForm1.FindContro
lblWorkshop_02.Visible = "false"
If Workshop_Two_Date.Checked = True Then
lblWorkshop_02.Visible = "true"
lblWorkshop_02.Text = "Date of Workshop: May 11, 2010"
'Workshop_Two_Date.Visible
Workshop_Two_Date.ID = "Date of Workshop Selected: May 11, 2010"
Else
Workshop_Two_Date.Text = "Not Selected "
lblWorkshop_02.Visible = "false"
lblWorkshop_02.Text = "Date of Workshop Not Selected: May 11, 2010"
Workshop_Two_Date.Visible = "true"
Workshop_Two_Date.ID = "Not Selected"
End If
End Sub
</script>
-------
Try this:
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindControl("Workshop_One_Date"), CheckBox)
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindControl("lblWorkshop_01"), Label)
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
'Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
Else
Workshop_One_Date.Text = "Not Selected "
lblWorkshop_01.Visible = "True"
lblWorkshop_01.Text = "Not Selected"
Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Not Selected "
End If
From the output I think you have some redundant code there.
Try this also:
Try this also:
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindControl("Workshop_One_Date"), CheckBox)
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindControl("lblWorkshop_01"), Label)
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
Else
lblWorkshop_01.Visible = "True"
lblWorkshop_01.Text = "Not Selected"
End If
ASKER
Lotok:
below is my s ub for checkbox one
----
<script runat="server">
Protected Sub CheckBox1_CheckedChanged(B yVal sender As Object, ByVal e As System.EventArgs)
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro l("Worksho p_One_Date "), CheckBox)
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro l("lblWork shop_01"), Label)
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
Else
lblWorkshop_01.Visible = "True"
lblWorkshop_01.Text = "Not Selected"
End If
End Sub
</script>
---------
below is my output
------------
First Name: test-44_luis
Last Name: test-44_hernandez
Title: test-44_TEST
Organization: test-44_hgac
Address: test-44_35555
City: test-44_houston
State: test-44_tx
Zip Code: test-44_770207
Phone #: 7136547878
Cell Phone #: 7136547878
Email: luis.hernandez@h-gac.com
Label: False
Date of Workshop Selected: May 11, 2010: True
Your Comments: : test-44_april 23 not selected and may 11 selected
-----
below is my s ub for checkbox one
----
<script runat="server">
Protected Sub CheckBox1_CheckedChanged(B
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop: April 23, 2010"
Else
lblWorkshop_01.Visible = "True"
lblWorkshop_01.Text = "Not Selected"
End If
End Sub
</script>
---------
below is my output
------------
First Name: test-44_luis
Last Name: test-44_hernandez
Title: test-44_TEST
Organization: test-44_hgac
Address: test-44_35555
City: test-44_houston
State: test-44_tx
Zip Code: test-44_770207
Phone #: 7136547878
Cell Phone #: 7136547878
Email: luis.hernandez@h-gac.com
Label: False
Date of Workshop Selected: May 11, 2010: True
Your Comments: : test-44_april 23 not selected and may 11 selected
-----
if you check the box and then uncheck it, then see the output.
I have a hunch that it will change, if it does, its because the checkbox didnt change, on the other tests. none of the checkedchanged code took place for that checkbox.
A solution to that is a checkboxlist rather than 2 checkboxes and put the code in indexchanged.
OR
have the event dates in the labels by default (like below). then you will just get a true beside the selected one and a false beside the one that wasnt selected.
I need to goto sleep, I will check back in about 7 hrs to see how it went.
I have a hunch that it will change, if it does, its because the checkbox didnt change, on the other tests. none of the checkedchanged code took place for that checkbox.
A solution to that is a checkboxlist rather than 2 checkboxes and put the code in indexchanged.
OR
have the event dates in the labels by default (like below). then you will just get a true beside the selected one and a false beside the one that wasnt selected.
I need to goto sleep, I will check back in about 7 hrs to see how it went.
<asp:Label ID="lblWorkshop_01" runat="server" AssociatedControlID="Workshop_One_Date" Text="Date of Workshop Selected: May 11, 2010" BackColor="Gray"></asp:Label>
ASKER
Lotok:
Thank you
I'll let you know progress
Thank you
I'll let you know progress
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you go with one of the options from above? which one?
All sorted?
All sorted?
ASKER
Lotok:
Yes, i followed your suggestion and this is my sub below:
-------
<script runat="server">
Protected Sub CheckBox1_CheckedChanged(B yVal sender As Object, ByVal e As System.EventArgs)
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro l("Worksho p_One_Date "), CheckBox)
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro l("lblWork shop_01"), Label)
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop Selected: April 23, 2010"
'Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
Else
lblWorkshop_01.Visible = "True"
lblWorkshop_01.Text = "Not Selected"
Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Not Selected"
End If
End Sub
</script>
----------
this generates a return like this:
---------
First Name: test-52_luis
Last Name: test-52_hernandez
Title: test-52_test
Organization: test-52_hgac
Address: test-52_3555
City: test-52_houston
State: test-52_tx
Zip Code: test-52_77027
Phone #: 7136547878
Cell Phone #: 7136567887
Email: luis.hernandez@h-gac.com
Date of Workshop Selected: April 23, 2010: True
Date of Workshop Selected: May 11, 2010: True
Your Comments: : test-52_ april 23 selected and may 11 selected
--------
It's just like you suggested. Thank you.
Yes, i followed your suggestion and this is my sub below:
-------
<script runat="server">
Protected Sub CheckBox1_CheckedChanged(B
Dim Workshop_One_Date As CheckBox = CType(RSVPForm1.FindContro
Dim lblWorkshop_01 As Label = CType(RSVPForm1.FindContro
lblWorkshop_01.Visible = "false"
If Workshop_One_Date.Checked = True Then
lblWorkshop_01.Visible = "true"
lblWorkshop_01.Text = "Date of Workshop Selected: April 23, 2010"
'Workshop_One_Date.Visible
Workshop_One_Date.ID = "Date of Workshop Selected: April 23, 2010"
Else
lblWorkshop_01.Visible = "True"
lblWorkshop_01.Text = "Not Selected"
Workshop_One_Date.Visible = "true"
Workshop_One_Date.ID = "Not Selected"
End If
End Sub
</script>
----------
this generates a return like this:
---------
First Name: test-52_luis
Last Name: test-52_hernandez
Title: test-52_test
Organization: test-52_hgac
Address: test-52_3555
City: test-52_houston
State: test-52_tx
Zip Code: test-52_77027
Phone #: 7136547878
Cell Phone #: 7136567887
Email: luis.hernandez@h-gac.com
Date of Workshop Selected: April 23, 2010: True
Date of Workshop Selected: May 11, 2010: True
Your Comments: : test-52_ april 23 selected and may 11 selected
--------
It's just like you suggested. Thank you.
Thanks, glad it all worked out.
Take it easy.
Take it easy.
returns where?
can u post a screenshot of the user control?