我正在尝试创建自定义Web控件,但我对Web窗体的使用经验有限。如何访问打开关闭标记之间传递的文本?控件应该像这样工作。
<asp:YesOrNoQuestion>Are you above the age of 18 ? </asp:YerOrNoQuestion>
<tr id="trQ6CA" runat="server" visible="false">
<td>
<asp:Label ForeColor="Black" ID="QuestionLabel" runat="server">
// Question Goes Here
</asp:Label>
</td>
<td>
<asp:RadioButtonList ID="buttonCollection" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="Y">Yes</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:RadioButtonList>
</td>
<td>
<asp:RequiredFieldValidator ControlToValidate="buttonCollection" ID="Requiredfieldvalidator" InitialValue="" runat="server" Text="*" ValidationGroup="vgApplication">
*
</asp:RequiredFieldValidator>
</td>
</tr>
<tr id="trQ6CA" runat="server" visible="false">
<td valign="top" align="left">
<asp:Label ID="Label10" runat="server" ForeColor="Black">
<b>DOES THE PROPOSED INSURED:</b>
Have a comprehensive health benefits from an insurance policy, an HMO plan, or employer health benefit plan? <br />
If No, persons without such comprehensive coverage are not eligible for this insurance policy.
</asp:Label>
</td>
<td valign="top">
<asp:RadioButtonList ID="rbtQ6S1" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="Y">Yes</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:RadioButtonList>
</td>
<td valign="top">
<asp:RequiredFieldValidator ID="Requiredfieldvalidator65" runat="server" Text="*" ControlToValidate="rbtQ6S1" InitialValue="" ValidationGroup="vgApplication">
*
</asp:RequiredFieldValidator>
</td>
</tr>