|
|
 |
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.
|
 |

May 24th, 2004, 06:49 AM
|
|
Registered User
|
|
Join Date: May 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

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
|
|
Visual Studio.net is the Package which contain
Vb.net
C#
VisualC.net
and others
Ahmed Ali
Software Developer
|

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)
{
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!
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |