473,480 Members | 5,041 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Login Control!!

Hi All, I have a website which allows users to visit anonymously. Throughout
the page I offer a signup link thru which a user can create an account. I
want the user to be redirected to the page on which he working when he
clicked up the signup link (which is create account wizard page )
How to accomplish this?

I know the request.REferealURl etc...API's but don't know where in the
create account wizard I shud place this?

TIA
Feb 6 '07 #1
2 1184
Hi,

when someone tries to access your secured page, the most probale way you
would be using is on Page_Load you would check if his session value is not
null, in case it is you will redirect him to the login page with appropiate
message. What you can do here is, you can pass the url of the page he has
got redirected from to the login as querystring, and after proper validation
you can redirect him back to that page as you would have the URL,...e.g:-

in your page_load, you would write.............

if (Session["LoginStatus"] == null){
Response.Redirect("UserLogIn.aspx?rurl=" +
Server.HtmlEncode(Page.AppRelativeVirtualPath));
}
and in your login page, after validation......

if (username and password id valid logic) {
Response.Redirect(Request.QueryString["rurl"].toString());
}

Hope this helps.

Rgds,
Bhaskar


"Vai2000" <no****@microsoft.comwrote in message
news:OH****************@TK2MSFTNGP05.phx.gbl...
Hi All, I have a website which allows users to visit anonymously.
Throughout
the page I offer a signup link thru which a user can create an account. I
want the user to be redirected to the page on which he working when he
clicked up the signup link (which is create account wizard page )
How to accomplish this?

I know the request.REferealURl etc...API's but don't know where in the
create account wizard I shud place this?

TIA


Feb 6 '07 #2
Thanks, though was looking for some out of the box functionality in asp.net
2.0
"Bhaskardeep Khaund" <bh*********@rediffmail.comwrote in message
news:uY**************@TK2MSFTNGP05.phx.gbl...
Hi,

when someone tries to access your secured page, the most probale way you
would be using is on Page_Load you would check if his session value is not
null, in case it is you will redirect him to the login page with
appropiate
message. What you can do here is, you can pass the url of the page he has
got redirected from to the login as querystring, and after proper
validation
you can redirect him back to that page as you would have the URL,...e.g:-

in your page_load, you would write.............

if (Session["LoginStatus"] == null){
Response.Redirect("UserLogIn.aspx?rurl=" +
Server.HtmlEncode(Page.AppRelativeVirtualPath));
}
and in your login page, after validation......

if (username and password id valid logic) {
Response.Redirect(Request.QueryString["rurl"].toString());
}

Hope this helps.

Rgds,
Bhaskar


"Vai2000" <no****@microsoft.comwrote in message
news:OH****************@TK2MSFTNGP05.phx.gbl...
Hi All, I have a website which allows users to visit anonymously.
Throughout
the page I offer a signup link thru which a user can create an account.
I
want the user to be redirected to the page on which he working when he
clicked up the signup link (which is create account wizard page )
How to accomplish this?

I know the request.REferealURl etc...API's but don't know where in the
create account wizard I shud place this?

TIA


Feb 6 '07 #3

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

Similar topics

14
2604
by: clintonG | last post by:
This is an appeal for peer support sent to Microsoft as will be noted in closing. The Login control does not include a Cancel button. The only option is to convert the Login control to a...
1
4507
by: EricRybarczyk | last post by:
I am starting a rewrite of an existing Classic ASP web site in ASP.NET 2.0. The existing ASP application has several types of users, each with a separate login process (separate login page,...
1
6944
by: Jeff Lynch | last post by:
I'd like to add the following attributes to the Login control's Login Button to create a CSS rollover effect. How can I access the control's login button from the page's code-behind? ...
3
5764
by: ilockett | last post by:
The background: I have a web app with a simple master page that contains just one content placeholder. I have created a web form that then uses this master page. Within the content...
3
2109
by: Bruce | last post by:
I just started the design of an ASP.NET application which accesses one of our custom web services to provide user authentication, among other purposes. I created a log-in page (code below),...
5
1905
by: Afshar | last post by:
Hi everybody there, I have a special Login page that wants users to enter 3 passwords rather than a single password. But can't do it with Login control. I tried following scenarios: 1. Put an...
3
1490
by: goot | last post by:
I'm trying to use the login control and have it use the membership provider framework to authenticate users and am having a problem (which i'm sure will turn out to be a stupid mistake on my...
2
4207
by: Sasquatch | last post by:
I'm having trouble creating a simple login page using the asp:login control. I followed some instructions in a WROX book, "Beginning ASP.NET 2.0," and the instructions are very straight forward,...
3
4321
by: =?Utf-8?B?RHVrZSAoQU4yNDcp?= | last post by:
The majority of pages on our site need authentication (forms auth against the aspnetdb database). I created an '~/auth' folder with its own config file forcing authentication for any pages in the...
6
8048
by: dan | last post by:
Hi, Could someone please let me know how to center a Login control on a page? Can I use CSS to do that? Thanks, Dan
0
7040
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6905
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7041
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
7080
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...
1
6736
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5331
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4772
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4478
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
561
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.