Invisible controls problem

Discussion in 'ASP .Net' started by Paul M., Aug 3, 2003.

  1. Paul M.

    Paul M. Guest

    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>
     
    Paul M., Aug 3, 2003
    #1
    1. Advertising

  2. 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>


    "Paul M." <> wrote in message news:bgihhe$6fd$...
    > 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>
    >
    >
    >
     
    carlos medina, Aug 3, 2003
    #2
    1. Advertising

  3. Paul M.

    Paul M. Guest

    The answer is given here, tried it and it works! Thanks to those who replied
    with suggestions.

    http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_
    20390476.html

    Cheers
    Paul M.

    "Paul M." <> wrote in message
    news:bgihhe$6fd$...
    > 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>
    >
    >
    >
     
    Paul M., Aug 4, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Soulis [MSFT]
    Replies:
    4
    Views:
    408
    John Soulis [MSFT]
    Jan 14, 2004
  2. =?Utf-8?B?VmVua2F0ZXNo?=

    User controls are invisible

    =?Utf-8?B?VmVua2F0ZXNo?=, May 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    311
    David Jessee
    May 8, 2004
  3. Peter Afonin

    Strange behavior of invisible controls

    Peter Afonin, May 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    339
    Peter Afonin
    May 20, 2004
  4. Martin
    Replies:
    7
    Views:
    3,671
    John Saunders
    Jun 2, 2004
  5. Andy B
    Replies:
    5
    Views:
    619
    Andy B
    May 29, 2008
Loading...

Share This Page