Invisible controls problem

  • Thread starter Thread starter Paul M.
  • Start date Start date
P

Paul M.

Hi,
I am trying to create a simple asp .net page that has some plain text,
a button and a label on it. However the plain text shows when I build &
browse it but the button and label dont, what on earth is going on!!! Below
is the page html / code.

My eternal gratitude to anyone who can sort this out!!

Cheers
Paul M.
--------------------------------------------------------------
<html>
<head>
<script language="VB" runat="server">

Sub SubmitBtn_Click(sender As Object, e As EventArgs)

If Radio2.Checked Then
Label1.Text = "You selected " & Radio2.Text
End If

End Sub

</script>
</head>
<body>
<h3>&nbsp;</h3>
<H3>
<asp:RadioButton id="Radio2" Text="Compact" GroupName="RadioGroup1"
runat="server" /><br>
TEST PAGE.</i>
</H3>
<form runat="server" ID="Form1">
<p>&nbsp;</p>
<P></P>
<asp:button text="Submit" OnClick="SubmitBtn_Click" runat="server"
ID="Button1" />
<asp:Label id="Label1" font-bold="true" runat="server" />
</form>
</P>
</body>
</html>
 
put the radiobuttonlist control inside the <form runat=server> tag:


<body>
<form runat="server" ID="Form1">
<h3>&nbsp;</h3>
<H3>
<asp:RadioButton id="Radio2" Text="Compact" GroupName="RadioGroup1"
runat="server" /><br>
TEST PAGE.</i>
</H3>
<p>&nbsp;</p>
<P></P>
<asp:button text="Submit" OnClick="SubmitBtn_Click" runat="server"
ID="Button1" />
<asp:Label id="Label1" font-bold="true" runat="server" />
</form>
</P>
</body>
 
Back
Top