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. opening GridView in contentplaceholder of masterpage

opening GridView in contentplaceholder of masterpage

Scheduled Pinned Locked Moved ASP.NET
sysadminhelp
7 Posts 2 Posters 1 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.
  • M Offline
    M Offline
    mominafiz
    wrote on last edited by
    #1

    hi, i am having a page with gridview and i want to open the page in master page...so to do this i removed the runat server attribute from the page and on the link button of the master page i referred the page with gridview ...but showed me an error " form with gridview must have runat=server attribute". when i put this attribute...and try to open in master page, the page with gridview loads leaving the masterpage....i figured out that when my masterpage form and gridview page form tag both have runat= server attribute then the gridview page will be loaded leaving the masterpage.

    Afiz Momin

    M S 3 Replies Last reply
    0
    • M mominafiz

      hi, i am having a page with gridview and i want to open the page in master page...so to do this i removed the runat server attribute from the page and on the link button of the master page i referred the page with gridview ...but showed me an error " form with gridview must have runat=server attribute". when i put this attribute...and try to open in master page, the page with gridview loads leaving the masterpage....i figured out that when my masterpage form and gridview page form tag both have runat= server attribute then the gridview page will be loaded leaving the masterpage.

      Afiz Momin

      M Offline
      M Offline
      mominafiz
      wrote on last edited by
      #2

      here is the gridview page file code: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ScheduleList.aspx.vb" Inherits="PATHOLOGY._Default" %>

      Schedule List

      1 Reply Last reply
      0
      • M mominafiz

        hi, i am having a page with gridview and i want to open the page in master page...so to do this i removed the runat server attribute from the page and on the link button of the master page i referred the page with gridview ...but showed me an error " form with gridview must have runat=server attribute". when i put this attribute...and try to open in master page, the page with gridview loads leaving the masterpage....i figured out that when my masterpage form and gridview page form tag both have runat= server attribute then the gridview page will be loaded leaving the masterpage.

        Afiz Momin

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

        please, tell me if u need a code .

        S 1 Reply Last reply
        0
        • M mominafiz

          please, tell me if u need a code .

          S Offline
          S Offline
          Sandeep Mewara
          wrote on last edited by
          #4

          What is this? Why are you posting to your question. In case you want to add anything to whatever you have asked, you can always go and edit it!

          1 Reply Last reply
          0
          • M mominafiz

            hi, i am having a page with gridview and i want to open the page in master page...so to do this i removed the runat server attribute from the page and on the link button of the master page i referred the page with gridview ...but showed me an error " form with gridview must have runat=server attribute". when i put this attribute...and try to open in master page, the page with gridview loads leaving the masterpage....i figured out that when my masterpage form and gridview page form tag both have runat= server attribute then the gridview page will be loaded leaving the masterpage.

            Afiz Momin

            S Offline
            S Offline
            Sandeep Mewara
            wrote on last edited by
            #5

            Ok! Here are few things you need to read on first... 1. What does runat=server means. So, basically, what will happen if you remove it or add it to the control. 2. Can a page that has a Master page have multiple form tags that has 'runat=server' in it? How many form tags with runat=server is allowed?

            M 1 Reply Last reply
            0
            • S Sandeep Mewara

              Ok! Here are few things you need to read on first... 1. What does runat=server means. So, basically, what will happen if you remove it or add it to the control. 2. Can a page that has a Master page have multiple form tags that has 'runat=server' in it? How many form tags with runat=server is allowed?

              M Offline
              M Offline
              mominafiz
              wrote on last edited by
              #6

              runat=server attribute indicates that the element should be treated as a server control And page can have one or more forms in page. How many form tags with runat=server is allowed? --> this thing i dont know. but form requires a runat attributes when using GridView Plz give briefing on this and solution to the problem.. thank u..

              S 1 Reply Last reply
              0
              • M mominafiz

                runat=server attribute indicates that the element should be treated as a server control And page can have one or more forms in page. How many form tags with runat=server is allowed? --> this thing i dont know. but form requires a runat attributes when using GridView Plz give briefing on this and solution to the problem.. thank u..

                S Offline
                S Offline
                Sandeep Mewara
                wrote on last edited by
                #7

                Put a form tag with runat="server" in master page. Put your Gridview in ContentPane of child page. That will do. Have a look of how Master pages are implemented: http://msdn.microsoft.com/en-us/library/wtxbf3hh.aspx[^] http://www.devx.com/dotnet/Article/18042/0/page/1[^] P.S.: No multiple form tags with runat="server"

                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