Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

Postback Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick K - 21 Mar 2008 22:37 GMT
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 K - 21 Mar 2008 23:09 GMT
Ooops, saw the error myself, forgot the "Is""

> 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
[quoted text clipped - 14 lines]
>         }
>     }
Jeroen Mostert - 21 Mar 2008 23:10 GMT
> 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.

Signature

J.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.