Invisible controls problem

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>
 
C

carlos medina

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>
 

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,731
Messages
2,569,432
Members
44,834
Latest member
BuyCannaLabsCBD

Latest Threads

Top