GridView not visible in ContentPlaceHolder on content page

905 views Asked by At

I am trying to create a page that uses a MasterPage to organize content. On my content page, I have created a text search, which will filter a GridView presentation of data.

When I use the databinding in a non-master page setup, it works perfectly. But, as soon as I drop the controls into a contentplaceholder on my page, it no longer displays any results.

Any suggestions would be greatly appreciated.

1

There are 1 answers

4
AudioBubble On

try these

  • debug your page with breakpoints and be sure your gridview datasource is not null
  • make sure you have registerd the controls in master page
  • Sometimes it is due to css. also check css of content page
  • try to make controls on content page not just copy and paste them from another page

To fatch the values from previous page store values in session and on second page

DataSet ds = (DataSet)(Session["id"]);
            Gridview1.DataSource = ds;
            Gridview1.DataBind();