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. Error :Button must be placed in Form

Error :Button must be placed in Form

Scheduled Pinned Locked Moved ASP.NET
helpsysadmin
5 Posts 3 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.
  • E Offline
    E Offline
    emran834
    wrote on last edited by
    #1

    Hello, In my Web form (Content page which has a master), i dragged and drop a Button server control but I am getting error that button must be place in a form with runat server. Fine, I placed

    manually in the code. Then I am getting error saying , only one form can be exist in a page ( with runat server) . So frustrating. What can I do. I dont see any form tag in the content page''s code. Please help. Thanks in advance Emran

    G M 2 Replies Last reply
    0
    • E emran834

      Hello, In my Web form (Content page which has a master), i dragged and drop a Button server control but I am getting error that button must be place in a form with runat server. Fine, I placed

      manually in the code. Then I am getting error saying , only one form can be exist in a page ( with runat server) . So frustrating. What can I do. I dont see any form tag in the content page''s code. Please help. Thanks in advance Emran

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Check the master page. It sounds like it has a form, but the content page isn't inside it. --- b { font-weight: normal; }

      E 1 Reply Last reply
      0
      • E emran834

        Hello, In my Web form (Content page which has a master), i dragged and drop a Button server control but I am getting error that button must be place in a form with runat server. Fine, I placed

        manually in the code. Then I am getting error saying , only one form can be exist in a page ( with runat server) . So frustrating. What can I do. I dont see any form tag in the content page''s code. Please help. Thanks in advance Emran

        M Offline
        M Offline
        minhpc_bk
        wrote on last edited by
        #3

        You might want to double check the Master Page and make sure that the contentplaceholder (whose id is specified in the Content control of the Content page) is placed in a form element which is marked with runat="server".

        E 1 Reply Last reply
        0
        • M minhpc_bk

          You might want to double check the Master Page and make sure that the contentplaceholder (whose id is specified in the Content control of the Content page) is placed in a form element which is marked with runat="server".

          E Offline
          E Offline
          emran834
          wrote on last edited by
          #4

          Thanks a lot ! yes, I found that in the master page, content was outside of form tag. Regards Emran.

          1 Reply Last reply
          0
          • G Guffa

            Check the master page. It sounds like it has a form, but the content page isn't inside it. --- b { font-weight: normal; }

            E Offline
            E Offline
            emran834
            wrote on last edited by
            #5

            Hi Guffa, Thanks a lot for your reply! yes, I found that in the master page, content was outside of form tag. Regards Emran.

            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