GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET
Go To First  |  Previous Question  |  Next Question 
 ASP.NET  |  Question 149 of 164    Print  
What is Ispostback method in ASP.Net? Why do we use that?
How can we use pointers in ASP.Net?

  
Total Answers and Comments: 4 Last Update: October 21, 2009     Asked by: kalaiselvi 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 17, 2007 07:28:12   #1  
umerrasheed Member Since: November 2007   Contribution: 1    

RE: What is Ispostback method in ASP.Net? Why do we us...
it's a property not a mether. It gets a value indicating whether the page is being loaded in response to a client postback or if it is being loaded and accessed for the first time.

regards
Umer Rasheed

 
Is this answer useful? Yes | No
April 18, 2008 05:58:29   #2  
Deeps2808 Member Since: April 2008   Contribution: 1    

RE: What is Ispostback method in ASP.Net? Why do we use that?How can we use pointers in ASP.Net?
Pointers can still be used by enclosing your code under unsafe section. However instead of pointers we can use referece variables and pointers to function can be achieved by using delegates
 
Is this answer useful? Yes | No
March 30, 2009 07:02:49   #3  
ravi.faq Member Since: March 2009   Contribution: 1    

RE: What is Ispostback method in ASP.Net? Why do we use that?How can we use pointers in ASP.Net?
Basically Post back is an action performed by a interactive Webpage. When it goes to the server side for a non-client Operation Server again posts it back to the client and hence the name.
Ex:

if(!IsPostBack)

will not allow the page to post back again n again bcoz it reduces the performance.
With Regards
Mr. Ravi More

 
Is this answer useful? Yes | No
October 20, 2009 12:03:48   #4  
kirangiet Member Since: June 2009   Contribution: 24    

RE: What is Ispostback method in ASP.Net? Why do we use that?How can we use pointers in ASP.Net?
IsPostBack is a property which returns boolean
value. It checks weather the page is postedback or not.

Note
: Loading a page and Post Back is
two different things.
e.g
Page_Load
{
if(!IsPostBack)
{

SqlConnection con new
SqlConnection(ConfigurationManager.ConnectionStrings[ TestConStr ].ConnectionString);

SqlDataAdapter da new SqlDataAdapter( Select * from TestTable con);

DataSet ds new DataSet();
da.Fill(ds TestTable );

GridView1.DataSource ds;
GridView1.DataBind();
}
}


The above code will run only first time when
the page is loaded. So within the code block we can write the code which
shouldn't execute on post backs of the page. Still we can view the data in

Gridview because ViewState for GridView is enable [:)].
So we need not to
run the code to populate the GridView every time. Hence performance gain.


Coming to Pointers
We can use Pointers in .NET with the help of
Unsafe Block. Just attach the unsafe keyword infront of method declaration
and you are done. Now you can write pointer code inside that method.
e.g.

unsafe public static void Main()
{
//Write code related to pointers.

}
 

Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape