473,387 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Multiple DestinationPageUrl in 2.0 based NOT on roles, but user table field

I extended Membership provider, put Login box onto the page,
associated it with my provider.
After successful login I need to redirect user based on one of the
fields in my Logins (Users) table - UserType (i do have roles, but i
don't use them here). But i can't see how i can access membership
extended class and all its overridden methods and properties, indeed I
do not create it explicitly!

Oct 30 '07 #1
4 1504
if you "extended" the Membership class and it is registered properly in your
web.config, you should be able to access it through the Membership type same
as you would do before you "extended" it. You aren't providing enough
information to know what "extended" means here - normally one would write a
custom provider that inherits from ProviderBase.
-- peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"al*******@gmail.com" wrote:
I extended Membership provider, put Login box onto the page,
associated it with my provider.
After successful login I need to redirect user based on one of the
fields in my Logins (Users) table - UserType (i do have roles, but i
don't use them here). But i can't see how i can access membership
extended class and all its overridden methods and properties, indeed I
do not create it explicitly!

Oct 30 '07 #2
Seems like i've made reply to the author.

Ok, so the question was - should I create my own instance of my
membership-extended class to get to know additional info about logged
user like this

protected void WizardLogin_LoggedIn(object sender, EventArgs e)
{
DB2MembershipProvider db2Provider = new DB2MembershipProvider();
MembershipUser db2user = db2Provider.GetUser(WizardLogin.UserName);
// and so forth i can get to know all db fields
}

or I may somehow get pointer to instance, that has been created when I
logged-in via Login control?

Why should I create one more instance, if there was already one
created with login class?

Oct 31 '07 #3
Ok, I can see that my suggestion is wrong - when I put something
inside of LoggedIn event, I get connection error when just logging-in.
Maybe I use instantiating incorrectly, but I would rather try to get
instance reference from login control...

Oct 31 '07 #4
Well, getting current membership user object is possible via static
membership class:
....LoggedIn(...) {
MembershipUser userInfo = Membership.GetUser(WizardLogin.Username,
true);
....
}

but I'd like to know how get rid of extra db call - if it really makes
a sense.
Maybe I should somehow save all often-required data from logins table
to use across the pages?
What is suitable for storing this?

Oct 31 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Smith | last post by:
I have a user assigned multiple roles and a role can be inherited from multiple parents (see below). How do I answer such questions as "How many roles does the user belongs to?" I answered the...
3
by: craig | last post by:
I am working on my first .NET development project that involves custom role-based security per the project requirements. This lead to a general design issue this week that really caused us some...
6
by: Christopher Harrison | last post by:
Is there a way to store an indefinite number of keys in one field and self join them? Imagine, for example, you have a table of users with a "friends" column. Say user 1 is friends with users 9, 7,...
3
by: Steven Stewart | last post by:
Hi there, I have posted about this before, but yet to arrive at a solution. I am going to try to explain this better. I have an Employees table and a Datarecords table (one-to-many...
7
by: Matthias S. | last post by:
Hi, here is what I'm trying to do: I have a virtual directory called "WebApp". Under this one I've got 2 physical directories called "Customers" and "Admins". I implemented Forms-based...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
3
by: VB Programmer | last post by:
How can you have multiple DestinationPageUrl's, based on their role. For example, if their an admin, then goto admin.aspx. If they're a member, goto member.aspx. Thanks!
6
by: thomson | last post by:
Hi All, i do hae a solution in which i do have mulitple projects including Web Projects,, Depending on the functionality it gets redirected to different web projects and it is working fine, ...
3
by: Glenn | last post by:
My current classic-ASP site has users, projects, roles and the 2.0 membership looks like a perfect fit, but I'm having trouble finding examples of how to have users that belong to different...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.