Postback Question

  • Thread starter Thread starter Rick K
  • Start date Start date
R

Rick K

Question: Did the (!Postback) method change from VS2005 to VS 2008?
I'm working in VS2008 and a tutporal DVD I am using, uses VS2005

This errors at the postback line in 2008 and not in 2005..why??

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!PostBack)
{
string copyright =
ConfigurationManager.AppSettings["CopyrightMessage"];
string email = ConfigurationManager.AppSettings["ContactEmail"];

InfoLabel.Text = copyright + ", " + email;
}
}
 
Rick said:
Question: Did the (!Postback) method change from VS2005 to VS 2008?

Nope. It doesn't exist in both versions.
I'm working in VS2008 and a tutporal DVD I am using, uses VS2005

This errors at the postback line in 2008 and not in 2005..why??
This is a wild guess, but it might be because the source you're compiling
with VS2005 really does use "IsPostBack", while the VS2008 pendant uses the
nonexistent "PostBack". That has nothing to do with Visual Studio, though.
 
Back
Top