Click here to Skip to main content
Rate this: bad
good
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
Edited 28-Nov-12 22:14pm
v2
Comments
Krunal R at 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
0 Dnyaneshwar@Pune 604
1 thatraja 370
2 OriginalGriff 329
3 Sergey Alexandrovich Kryukov 290
4 CPallini 219
0 OriginalGriff 697
1 Dnyaneshwar@Pune 604
2 Kornfeld Eliyahu Peter 495
3 thatraja 370
4 Sergey Alexandrovich Kryukov 344


Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 29 Nov 2012
Copyright © CodeProject, 1999-2014
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