Invisible controls problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul M.

    #1

    Invisible controls problem

    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:RadioButto n id="Radio2" Text="Compact" GroupName="Radi oGroup1"
    runat="server" /><br>
    TEST PAGE.</i>
    </H3>
    <form runat="server" ID="Form1">
    <p>&nbsp;</p>
    <P></P>
    <asp:button text="Submit" OnClick="Submit Btn_Click" runat="server"
    ID="Button1" />
    <asp:Label id="Label1" font-bold="true" runat="server" />
    </form>
    </P>
    </body>
    </html>



  • carlos medina

    #2
    Re: Invisible controls problem


    put the radiobuttonlist control inside the <form runat=server> tag:


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


    "Paul M." <paul@nospam.fs net.co.uk> wrote in message news:bgihhe$6fd $1@newsg1.svr.p ol.co.uk...[color=blue]
    > 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:RadioButto n id="Radio2" Text="Compact" GroupName="Radi oGroup1"
    > runat="server" /><br>
    > TEST PAGE.</i>
    > </H3>
    > <form runat="server" ID="Form1">
    > <p>&nbsp;</p>
    > <P></P>
    > <asp:button text="Submit" OnClick="Submit Btn_Click" runat="server"
    > ID="Button1" />
    > <asp:Label id="Label1" font-bold="true" runat="server" />
    > </form>
    > </P>
    > </body>
    > </html>
    >
    >
    >[/color]

    Comment

    • Paul M.

      #3
      Re: Invisible controls problem

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


      20390476.html

      Cheers
      Paul M.

      "Paul M." <paul@nospam.fs net.co.uk> wrote in message
      news:bgihhe$6fd $1@newsg1.svr.p ol.co.uk...[color=blue]
      > Hi,
      > I am trying to create a simple asp .net page that has some plain[/color]
      text,[color=blue]
      > 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!!![/color]
      Below[color=blue]
      > 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:RadioButto n id="Radio2" Text="Compact" GroupName="Radi oGroup1"
      > runat="server" /><br>
      > TEST PAGE.</i>
      > </H3>
      > <form runat="server" ID="Form1">
      > <p>&nbsp;</p>
      > <P></P>
      > <asp:button text="Submit" OnClick="Submit Btn_Click" runat="server"
      > ID="Button1" />
      > <asp:Label id="Label1" font-bold="true" runat="server" />
      > </form>
      > </P>
      > </body>
      > </html>
      >
      >
      >[/color]


      Comment

      Working...