radiobutton in visual studio

G

Guest

I am having a problem getting my visual studio to recognize my option buttons
within a table control. When I place
<asp:TableCell>
<asp:RadioButton idâ€test1†Text=â€Test†GroupName=â€Vote†runat=â€server†/>
</asp:TableCell>
and try to access that Radiobutton within the page_load I get a error
telling it does not no what that object is. If i use a regular HTML table it
works, but not in a table control.

On the other hand the following works if I use don’t use code behind in
visual studio, and just create my own aspx file with everything on the same
page. Example:

<script runat="server">
Sub Page_Load(sender as object, e as eventArgs)

Test1.Visible = False

End sub
</script>
<html>
<body>
<form runat="server">
<asp:Table id="Table1" runat="server">
<asp:TableRow>
<asp:TableCell>
<asp:RadioButton id="test1" GroupName="Vote" runat="server" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>
</body>
</html>

can someone please help me with this problem?
 
G

Guest

Thanks for the response.
I did not have the code right in front of me at the time, so I just typed it
wrong.

Below is a snippet of the actual code I am using.

<asp:TableRow>
<asp:TableCell Width="30" BackCOLOR="#4E4E4E"></asp:TableCell>
<asp:tableCell BACKCOLOR="Black" HorizontalAlign="Center" ColumnSpan="2">
<asp:RadioButton id="btnVote5" Text=" 5" FORECOLOR="Yellow"
GroupName="Vote" runat="server" Font-Bold="true" />
</asp:tableCell>
<asp:TableCell BackColor="Black"></asp:TableCell>
<asp:TableCell Width="30" BackCOLOR="#4E4E4E"></asp:TableCell>
</asp:TableRow>


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

ME.VOTE1.Visible = False

End Sub

Gives me the error: 'btnVote5' is not a member


Any help would be most appreciated.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top