p2p.wrox.com 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 24th, 2004, 06:49 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old May 24th, 2004, 04:44 PM
Friend of Wrox
Points: 965, Level: 12
Points: 965, Level: 12 Points: 965, Level: 12 Points: 965, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

Visual Studio.net is the Package which contain
Vb.net
C#
VisualC.net
and others

Ahmed Ali
Software Developer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old May 25th, 2004, 11:02 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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)

{

    base.OnInit(e);

    this.PhilePage_LoadUser();

    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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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
Inheriting from System.Web.UI aadz5 ASP.NET 1.1 2 March 28th, 2004 12:52 AM



All times are GMT -4. The time now is 12:08 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc