Postback Question

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;
}
}
 
J

Jeroen Mostert

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top