Click here to Skip to main content
12,398,181 members (50,470 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET Ajax
In my master page I have a repeater and a gridview like:
protected void Page_Load(object sender, EventArgs e)
{
    repeatername.visible=true;
}
 
protected void ListBox2_SelectedIndexChanged(object sender, EventArgs e)
{
    repeatername.visible=false;
    gridviewname.visible=true;
}
Note: Both the repeatername and gridviewname are placed in the same position in designer of master page. When I run the program, the gridview is overlapped by repeatername because of continuous page_load!
How to solve this. Can any one help.
Posted 28-Nov-12 21:58pm
Updated 28-Nov-12 22:14pm
v2
Comments
Krunal R 29-Nov-12 4:12am
   
Separate their positions..

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Hello

Simply use:
protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        repeatername.visible=true;
    }
}
This should fix your problem.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 29 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100