Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Panels and multiple form tags?

Panels and multiple form tags?

Scheduled Pinned Locked Moved ASP.NET
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dazinith
    wrote on last edited by
    #1

    i have a user control (RightPane.ascx) which has a few panels that i can hide.. to use asp:Panel i have to use a form tag.. i am using this user control on the right hand side of all my pages, and now im trying to put it on a page which has a form tag on it itself used for gathering some information.. if i try to put my RightPane.ascx on this page i get an error telling me that i cannot have multiple form tags on the same page.. is there a way to have panels in a user control and put that user control on a data entry page? i have to assume its possible, but from the looks of it im wrong.. so whats the best way for me to go about this? any suggestions are appreciated, thanks for your help! still a newb.. cut me some slack :P -dz

    P 1 Reply Last reply
    0
    • D dazinith

      i have a user control (RightPane.ascx) which has a few panels that i can hide.. to use asp:Panel i have to use a form tag.. i am using this user control on the right hand side of all my pages, and now im trying to put it on a page which has a form tag on it itself used for gathering some information.. if i try to put my RightPane.ascx on this page i get an error telling me that i cannot have multiple form tags on the same page.. is there a way to have panels in a user control and put that user control on a data entry page? i have to assume its possible, but from the looks of it im wrong.. so whats the best way for me to go about this? any suggestions are appreciated, thanks for your help! still a newb.. cut me some slack :P -dz

      P Offline
      P Offline
      Paul Watson
      wrote on last edited by
      #2

      Don't put FORM tags in your user control. Then in your ASPX page make sure the User Control reference is within the ASPX pages FORM tags. e.g.

      <body>
      <form runat="server">
      <sab:themechanger id="themechangerMain" runat="server" />
      </form>
      </body>

      Then in your UC just remove your FORM tags. Don't worry about there not being FORM tags in the User Control, it is not needed when the User Control itself is wrapped properly. Just try it :)

      Paul Watson
      Bluegrass
      Cape Town, South Africa

      Macbeth muttered: I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er DavidW wrote: You are totally mad. Nice.

      D 1 Reply Last reply
      0
      • P Paul Watson

        Don't put FORM tags in your user control. Then in your ASPX page make sure the User Control reference is within the ASPX pages FORM tags. e.g.

        <body>
        <form runat="server">
        <sab:themechanger id="themechangerMain" runat="server" />
        </form>
        </body>

        Then in your UC just remove your FORM tags. Don't worry about there not being FORM tags in the User Control, it is not needed when the User Control itself is wrapped properly. Just try it :)

        Paul Watson
        Bluegrass
        Cape Town, South Africa

        Macbeth muttered: I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er DavidW wrote: You are totally mad. Nice.

        D Offline
        D Offline
        dazinith
        wrote on last edited by
        #3

        works good for me! thanks for the pointer :-D still a newb.. cut me some slack :P -dz

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups