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. problem with web controls

problem with web controls

Scheduled Pinned Locked Moved ASP.NET
helpvisual-studiosysadminjsontutorial
18 Posts 6 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.
  • A Offline
    A Offline
    accessred
    wrote on last edited by
    #1

    i am making a website in VS 2005 wth framework 2.0. i have created a masterpage.and placed a content holder there. in the next default page,which is inherited the masterpage contains a table with 10 x 10 rows and columns.problem is that i cant place any textbox or other web controls in that table.when placing this error is coming**:"Control 'ctl00_ContentPlaceHolder1_TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server."** all other labels are coming.how to solve this?

    "I am burning...the only thing rest in me is you..."

    S P D M M 5 Replies Last reply
    0
    • A accessred

      i am making a website in VS 2005 wth framework 2.0. i have created a masterpage.and placed a content holder there. in the next default page,which is inherited the masterpage contains a table with 10 x 10 rows and columns.problem is that i cant place any textbox or other web controls in that table.when placing this error is coming**:"Control 'ctl00_ContentPlaceHolder1_TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server."** all other labels are coming.how to solve this?

      "I am burning...the only thing rest in me is you..."

      S Offline
      S Offline
      SunithaNallana
      wrote on last edited by
      #2

      COOl... In the design mode keep the cursor within content then you can drag and drop any control(here textbox),after getting that you can place it where ever you want(here table cell) Try it out let me know the result 'coz i am new to programming "HAPPY PROGRAMMING"

      A 1 Reply Last reply
      0
      • A accessred

        i am making a website in VS 2005 wth framework 2.0. i have created a masterpage.and placed a content holder there. in the next default page,which is inherited the masterpage contains a table with 10 x 10 rows and columns.problem is that i cant place any textbox or other web controls in that table.when placing this error is coming**:"Control 'ctl00_ContentPlaceHolder1_TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server."** all other labels are coming.how to solve this?

        "I am burning...the only thing rest in me is you..."

        P Offline
        P Offline
        Prateek G
        wrote on last edited by
        #3

        I guess this textbox has attribute runat="server" , if yes remove it.

        A 1 Reply Last reply
        0
        • S SunithaNallana

          COOl... In the design mode keep the cursor within content then you can drag and drop any control(here textbox),after getting that you can place it where ever you want(here table cell) Try it out let me know the result 'coz i am new to programming "HAPPY PROGRAMMING"

          A Offline
          A Offline
          accessred
          wrote on last edited by
          #4

          i have done the same.normally it shud come.but now this error is coming.while placing html controls its not showing error.but while dragging other webcontrols and server controls,its showing error.

          "I am burning...the only thing rest in me is you..."

          1 Reply Last reply
          0
          • A accessred

            i am making a website in VS 2005 wth framework 2.0. i have created a masterpage.and placed a content holder there. in the next default page,which is inherited the masterpage contains a table with 10 x 10 rows and columns.problem is that i cant place any textbox or other web controls in that table.when placing this error is coming**:"Control 'ctl00_ContentPlaceHolder1_TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server."** all other labels are coming.how to solve this?

            "I am burning...the only thing rest in me is you..."

            D Offline
            D Offline
            Deepak the Cool
            wrote on last edited by
            #5

            Can You write here your default page html code.........

            Deepak :) Smile a Lots,Its Costs Nothing

            A 2 Replies Last reply
            0
            • P Prateek G

              I guess this textbox has attribute runat="server" , if yes remove it.

              A Offline
              A Offline
              accessred
              wrote on last edited by
              #6

              while removing that,it shows an error in the cell itself:"Error creating control-Text box: no "runat=server" ttribute is present on the text tag.

              "I am burning...the only thing rest in me is you..."

              P 1 Reply Last reply
              0
              • A accessred

                while removing that,it shows an error in the cell itself:"Error creating control-Text box: no "runat=server" ttribute is present on the text tag.

                "I am burning...the only thing rest in me is you..."

                P Offline
                P Offline
                Prateek G
                wrote on last edited by
                #7

                use this

                A 1 Reply Last reply
                0
                • D Deepak the Cool

                  Can You write here your default page html code.........

                  Deepak :) Smile a Lots,Its Costs Nothing

                  A Offline
                  A Offline
                  accessred
                  wrote on last edited by
                  #8

                  @ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

                  D M 2 Replies Last reply
                  0
                  • A accessred

                    @ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

                    D Offline
                    D Offline
                    Deepak the Cool
                    wrote on last edited by
                    #9

                    Are you using one or more content palce holder into your masterpage if yes then use the following code in ur aspx page Now put ur table's code here * this is ur masterpage content place holder ID Hope this'll help u now time for leave if u want to more help thn write to here i'll able to solve this tomarow.... till thn njoy your error or njoy your output.... Deepak :) Smile a Lots,Its Costs Nothing

                    1 Reply Last reply
                    0
                    • A accessred

                      i am making a website in VS 2005 wth framework 2.0. i have created a masterpage.and placed a content holder there. in the next default page,which is inherited the masterpage contains a table with 10 x 10 rows and columns.problem is that i cant place any textbox or other web controls in that table.when placing this error is coming**:"Control 'ctl00_ContentPlaceHolder1_TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server."** all other labels are coming.how to solve this?

                      "I am burning...the only thing rest in me is you..."

                      M Offline
                      M Offline
                      Michael Sync
                      wrote on last edited by
                      #10

                      Please check the following things. 1. Do you have form tag in your master page? 2. All web controls are in form tag??

                      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

                      A 1 Reply Last reply
                      0
                      • A accessred

                        @ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

                        M Offline
                        M Offline
                        Michael Sync
                        wrote on last edited by
                        #11

                        Please checked "Ignore HTML tags in this message (good for code snippets)" when you post your code..

                        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

                        1 Reply Last reply
                        0
                        • A accessred

                          i am making a website in VS 2005 wth framework 2.0. i have created a masterpage.and placed a content holder there. in the next default page,which is inherited the masterpage contains a table with 10 x 10 rows and columns.problem is that i cant place any textbox or other web controls in that table.when placing this error is coming**:"Control 'ctl00_ContentPlaceHolder1_TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server."** all other labels are coming.how to solve this?

                          "I am burning...the only thing rest in me is you..."

                          M Offline
                          M Offline
                          MCEdwards
                          wrote on last edited by
                          #12

                          This message means that you are trying to place a text box outside the page form. You need to ensure that you place the textbox between a form tag with runat="server". For example: <asp:TextBox id="textbox1" runat="server" /> If you want the textbox to be in the table then ensure that the table is between the form tags. The simplest solution is to add the form tag to the master page so that it wraps the content place holder, this means that any page that inherits the master page will automatically have the form tag. This is not best practice because it will mean that pages that do not use forms will have the form and therefore view state sent with them which increase page download times and eats your bandwidth, but for quick test solution its job done. Hope this helps.

                          A 1 Reply Last reply
                          0
                          • M MCEdwards

                            This message means that you are trying to place a text box outside the page form. You need to ensure that you place the textbox between a form tag with runat="server". For example: <asp:TextBox id="textbox1" runat="server" /> If you want the textbox to be in the table then ensure that the table is between the form tags. The simplest solution is to add the form tag to the master page so that it wraps the content place holder, this means that any page that inherits the master page will automatically have the form tag. This is not best practice because it will mean that pages that do not use forms will have the form and therefore view state sent with them which increase page download times and eats your bandwidth, but for quick test solution its job done. Hope this helps.

                            A Offline
                            A Offline
                            accessred
                            wrote on last edited by
                            #13

                            Its working fine now.Thank you very much.Actually i m new to frame work 2.0 and form tag.

                            "I am burning...the only thing rest in me is you..."

                            1 Reply Last reply
                            0
                            • M Michael Sync

                              Please check the following things. 1. Do you have form tag in your master page? 2. All web controls are in form tag??

                              Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

                              A Offline
                              A Offline
                              accessred
                              wrote on last edited by
                              #14

                              Its working fine now.Thank you very much.Actually i m new to frame work 2.0 and form tag.

                              "I am burning...the only thing rest in me is you..."

                              M 1 Reply Last reply
                              0
                              • D Deepak the Cool

                                Can You write here your default page html code.........

                                Deepak :) Smile a Lots,Its Costs Nothing

                                A Offline
                                A Offline
                                accessred
                                wrote on last edited by
                                #15

                                Its working fine now.Thank you very much.Actually i m new to frame work 2.0 and form tag.

                                "I am burning...the only thing rest in me is you..."

                                D 1 Reply Last reply
                                0
                                • P Prateek G

                                  use this

                                  A Offline
                                  A Offline
                                  accessred
                                  wrote on last edited by
                                  #16

                                  Its working fine now.Thank you very much.Actually i m new to frame work 2.0 and form tag.

                                  "I am burning...the only thing rest in me is you..."

                                  1 Reply Last reply
                                  0
                                  • A accessred

                                    Its working fine now.Thank you very much.Actually i m new to frame work 2.0 and form tag.

                                    "I am burning...the only thing rest in me is you..."

                                    M Offline
                                    M Offline
                                    Michael Sync
                                    wrote on last edited by
                                    #17

                                    glad to hear that. :)

                                    Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

                                    1 Reply Last reply
                                    0
                                    • A accessred

                                      Its working fine now.Thank you very much.Actually i m new to frame work 2.0 and form tag.

                                      "I am burning...the only thing rest in me is you..."

                                      D Offline
                                      D Offline
                                      Deepak the Cool
                                      wrote on last edited by
                                      #18

                                      Thanks And Regards

                                      Deepak :) Smile a Lots,Its Costs Nothing

                                      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