Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 18, 2008 06:58 AM by email@example.com
Feb 26, 2007 03:31 PM|LINK
I am using login.aspx and I want to ridirect users to different URL after the login. Is this possible? I tried for a while but I can't find a way to do that.
Thanks for your answers, Chris
Feb 26, 2007 05:10 PM|LINK
After they have logged in and event is raised, which is the LoggedIn event.
<asp:Login ID="Login1" runat="server" OnLoggedIn="Login1_LoggedIn">
protected void Login1_LoggedIn(object sender, EventArgs e)
Feb 26, 2007 05:35 PM|LINK
thanks for your answer.
I have 2 users. "User1" I want to redirect to "~side1" and "user2" I want to redirect to "~side2".
I do not know how. Hope you can help me.
Feb 26, 2007 05:49 PM|LINK
Feb 26, 2007 06:01 PM|LINK
user1 should have access to other data from a sql db than user2. In detail:
I have a db where two prices are in (article, price1, price2). When user1 is logged in he should only get Article and price1. If user 2 than only Article and price2.
I thought the best way to handle that is to have two pages with two different sql queries. I tried out to find a code where you can use a variable in the sql query (sqldatasource), but I did not find a way.
Perhaps you have an idea?
Feb 26, 2007 06:18 PM|LINK
I would suggest using 1 query to get the article, the price1 and the price 2. Once you have this, you need to specify which price to use depending on the user.
Feb 26, 2007 06:25 PM|LINK
how can I specify the price to use? Can I use a variable in the sql query for the loggedin user?
Feb 26, 2007 06:35 PM|LINK
Just use 1 query for example:
SELECT article, price1, price2 FROM Articles WHERE id = 2
This will return the 3 things, the article, price1 and price2.
So then depending on the User, for example:
price = price1;
price = price2;
Feb 26, 2007 06:36 PM|LINK
I would assign role to user and check the role, Depend on the roles give rights to access pages or application.
Feb 26, 2007 06:47 PM|LINK
Sorry, this is my code:
If I try what you had written I just get an Parsererror. I understand what you mean, but I have no idea where to put the code that it will work.