Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old May 24th, 2004, 06:49 AM
Registered User
Join Date: May 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Subclassing system.web.ui.page

Has anyone found the definitive answer the question regarding the load order and the site principal issues when using visual studio.net and vb.net

I has seen many posts but do final answer from anyone.

  #2 (permalink)  
Old May 24th, 2004, 04:44 PM
Friend of Wrox
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000

Visual Studio.net is the Package which contain
and others

Ahmed Ali
Software Developer
  #3 (permalink)  
Old May 25th, 2004, 11:02 AM
Registered User
Join Date: May 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

I know what visual basic is that wasn't even the question.

here is the fix for the problem i found, and it works

If you want to avoid having to put the line "base.PhilePage_Load(sender, e) in your derived page's On_Load event, then instead take the code for replacing the context.user with the custom SitePrincipal object out of the PhilePage_Load method, and create a new method in the base page such as PhilePage_LoadUser. Then, in the base page OnInit method, change it to read:

protected override void OnInit(EventArgs e)




    this.Error += new System.EventHandler(this.PhilePage_Error);


Now your derived page will execute and you can use the code in MyAccount.aspx exactly as is, and it will correctly pull the role info from the SitePrincipal and display it without any errors about invalid casts.

Woo hoo!


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobile Control in System.Web.UI.Page hpfarstad ASP.NET 2.0 Professional 0 August 28th, 2006 06:00 AM
access information from a datalist System.Web.UI.I kristian1977 ASP.NET 2.0 Basics 0 July 21st, 2006 09:28 AM
No System.Web.UI alexanderH BOOK: ASP.NET Website Programming Problem-Design-Solution 2 March 10th, 2005 03:04 AM
namespace System.Web.UI henninga BOOK: ASP.NET Website Programming Problem-Design-Solution 9 November 16th, 2004 03:51 PM

All times are GMT -4. The time now is 03:01 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.