0

When ever i do postback the page get blanked, i have seen some pages, where page is not being blank while post back

can some give me idea how it can be done

Thank You

M Akela
  • 249
  • 5
  • 21

3 Answers3

2
   private void Page_Load()
    {
       if (IsPostBack)
        {
             // It is a postback
         } 
     else  
        {
              // It is not a postback
         }

         }

refer this link

http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback.aspx

backtrack
  • 7,996
  • 5
  • 52
  • 99
1

Did you bind data on post back? example:

protected void Page_Load(object sender, EventArgs e)
    {
       textBox1.Text = "";
    } 

try adding if(!IsPostBack)

protected void Page_Load(object sender, EventArgs e)
    {
      if(!IsPostBack)
     {
        textBox1.Text = "";
     }
    } 
Community
  • 1
  • 1
User2012384
  • 4,769
  • 16
  • 70
  • 106
0

Try using update panels. This way you only have to post back the areas that require post back. You will not feel the flicker.

Nisha
  • 1,379
  • 16
  • 28