472,111 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Need to pass information into a web page.

What I am trying to do is as follows.
I have a page with 3 links,that direct the user to 3 different pages when selected after login.
So all link selections will first direct the user to a login page. Once the user logs in then they are directed to the appropriate link.
So for all 3 links they all go to a login page, but each link must pass information to the login in page, specifically the page to go to after login takes place.
--
Paul G
Software engineer.
Nov 18 '05 #1
9 1849
"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
What I am trying to do is as follows.
I have a page with 3 links,that direct the user to 3 different pages when selected after login. So all link selections will first direct the user to a login page. Once the user logs in then they are directed to the appropriate link. So for all 3 links they all go to a login page, but each link must pass

information to the login in page, specifically the page to go to after login
takes place.

I suggest that you look into Forms Authentication. See Forms Authentication
Provider
(http://msdn.microsoft.com/library/de...-us/cpguide/ht
ml/cpconTheCookieAuthenticationProvider.asp)
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2
<a href="http://yourdomain.com/loginpage.aspx?Redirect=someotherpage.aspx">

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
What I am trying to do is as follows.
I have a page with 3 links,that direct the user to 3 different pages when selected after login. So all link selections will first direct the user to a login page. Once the user logs in then they are directed to the appropriate link. So for all 3 links they all go to a login page, but each link must pass information to the login in page, specifically the page to go to after login
takes place. --
Paul G
Software engineer.

Nov 18 '05 #3
Hi Kevin, thanks for the response.
so in the login file what do I pass into the redirect statement as I normally
use it as shown below, with the redirect hardcoded in.
Response.Redirect("denied.htm")
--
Paul G
Software engineer.
"Kevin Spencer" wrote:
<a href="http://yourdomain.com/loginpage.aspx?Redirect=someotherpage.aspx">

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
What I am trying to do is as follows.
I have a page with 3 links,that direct the user to 3 different pages when

selected after login.
So all link selections will first direct the user to a login page. Once

the user logs in then they are directed to the appropriate link.
So for all 3 links they all go to a login page, but each link must pass

information to the login in page, specifically the page to go to after login
takes place.
--
Paul G
Software engineer.


Nov 18 '05 #4
Response.Redirect(Request.QueryString("Redirect"))

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com...
Hi Kevin, thanks for the response.
so in the login file what do I pass into the redirect statement as I normally use it as shown below, with the redirect hardcoded in.
Response.Redirect("denied.htm")
--
Paul G
Software engineer.
"Kevin Spencer" wrote:
<a href="http://yourdomain.com/loginpage.aspx?Redirect=someotherpage.aspx">
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
What I am trying to do is as follows.
I have a page with 3 links,that direct the user to 3 different pages
when selected after login.
So all link selections will first direct the user to a login page.
Once the user logs in then they are directed to the appropriate link.
So for all 3 links they all go to a login page, but each link must
pass information to the login in page, specifically the page to go to after login takes place.
--
Paul G
Software engineer.


Nov 18 '05 #5
Dont' reinvent the wheel. Use the built-in Forms Authentication which
already provides this kind of functionality. Here's more info:
http://www.dotnetbips.com/displayarticle.aspx?id=9
http://www.4guysfromrolla.com/webtech/121901-1.2.shtml
http://www.dotnetbips.com/displayarticle.aspx?id=117

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
What I am trying to do is as follows.
I have a page with 3 links,that direct the user to 3 different pages when selected after login. So all link selections will first direct the user to a login page. Once the user logs in then they are directed to the appropriate link. So for all 3 links they all go to a login page, but each link must pass information to the login in page, specifically the page to go to after login
takes place. --
Paul G
Software engineer.

Nov 18 '05 #6
Hi Kevin, thanks for the additional information. For some reason I am getting nothing for the QueryString from the debugger. I modified the hyperlink created by
..NET,NavigateUrl.
<asp:HyperLink id="HyperLink15" style="Z-INDEX: 119; LEFT: 536px; POSITION: absolute; TOP: 48px"runat="server" NavigateUrl="login.aspx? Redirect=view_code.aspx" Target="_new" Font Size="Smaller">Code</asp:HyperLink>
When I run the app and select the hyperlink it goes to login.aspx with
this showing on the browser-http://localhost/newdm1/login.aspx?%20Redirect=view_code.aspx
But in login.aspx I am getting empty for the temstr below.
Dim temstr As String = Request.QueryString("Redirect")
Also
Response.Redirect(Request.QueryString("Redirect"))
creates a runtime error-empty URL
Thanks.
--
Paul G
Software engineer.
"Kevin Spencer" wrote:
Response.Redirect(Request.QueryString("Redirect"))

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com...
Hi Kevin, thanks for the response.
so in the login file what do I pass into the redirect statement as I

normally
use it as shown below, with the redirect hardcoded in.
Response.Redirect("denied.htm")
--
Paul G
Software engineer.
"Kevin Spencer" wrote:
<a href="http://yourdomain.com/loginpage.aspx?Redirect=someotherpage.aspx">
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
> What I am trying to do is as follows.
> I have a page with 3 links,that direct the user to 3 different pages when selected after login.
> So all link selections will first direct the user to a login page. Once the user logs in then they are directed to the appropriate link.
> So for all 3 links they all go to a login page, but each link must pass information to the login in page, specifically the page to go to after login takes place.
> --
> Paul G
> Software engineer.


Nov 18 '05 #7
Hi Kevin, got it working, can ignore the prev reply. Thanks for the help.
--
Paul G
Software engineer.
"Kevin Spencer" wrote:
Response.Redirect(Request.QueryString("Redirect"))

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com...
Hi Kevin, thanks for the response.
so in the login file what do I pass into the redirect statement as I

normally
use it as shown below, with the redirect hardcoded in.
Response.Redirect("denied.htm")
--
Paul G
Software engineer.
"Kevin Spencer" wrote:
<a href="http://yourdomain.com/loginpage.aspx?Redirect=someotherpage.aspx">
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
> What I am trying to do is as follows.
> I have a page with 3 links,that direct the user to 3 different pages when selected after login.
> So all link selections will first direct the user to a login page. Once the user logs in then they are directed to the appropriate link.
> So for all 3 links they all go to a login page, but each link must pass information to the login in page, specifically the page to go to after login takes place.
> --
> Paul G
> Software engineer.


Nov 18 '05 #8
Ok, kind of new to .NET so not aware of all of its capability. I just got through writing a routine that does loops through rows of a database, does a string compare to match names, then retrieves a password and attempts a compare on that. I am guessing that .NET has built in functions to do this.
thanks
--
Paul G
Software engineer.
"Steve C. Orr [MVP, MCSD]" wrote:
Dont' reinvent the wheel. Use the built-in Forms Authentication which
already provides this kind of functionality. Here's more info:
http://www.dotnetbips.com/displayarticle.aspx?id=9
http://www.4guysfromrolla.com/webtech/121901-1.2.shtml
http://www.dotnetbips.com/displayarticle.aspx?id=117

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
What I am trying to do is as follows.
I have a page with 3 links,that direct the user to 3 different pages when

selected after login.
So all link selections will first direct the user to a login page. Once

the user logs in then they are directed to the appropriate link.
So for all 3 links they all go to a login page, but each link must pass

information to the login in page, specifically the page to go to after login
takes place.
--
Paul G
Software engineer.


Nov 18 '05 #9
The Request object requires two trips to the server and can and will
affect performance.

Generally speaking, since ASP 3.0 and most especially with ASP.NET
the *only* reason to use the Request object to 'redirect' is when you
are redirecting to pages on another server or redirecting to pages that
are *not* .aspx files on the same server from which your code does the
redirection (or .asp files on the same server when using ASP 3.0).

You should be properly informed and as I am taking the responsibility
to do so I am telling you to learn to use the Transfer method when
your business process requires redirection. You also want to learn
the Execute method so you can learn how to return data to the calling
page when redirecting.

Start with MSDN documentation and refine your understanding with
Google searches such as those that follow. For the most part it can be
said that while it is still supported for reasons noted, the Request object
is obsolete.

Google: "transfer method"+"asp.net"
Google: 'execute method"+"asp.net"

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/


"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
Hi Kevin, got it working, can ignore the prev reply. Thanks for the help.
--
Paul G
Software engineer.
"Kevin Spencer" wrote:
Response.Redirect(Request.QueryString("Redirect"))

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com...
Hi Kevin, thanks for the response.
so in the login file what do I pass into the redirect statement as I

normally
use it as shown below, with the redirect hardcoded in.
Response.Redirect("denied.htm")
--
Paul G
Software engineer.
"Kevin Spencer" wrote:

> <a

href="http://yourdomain.com/loginpage.aspx?Redirect=someotherpage.aspx">
>
> --
> HTH,
> Kevin Spencer
> ..Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Paul" <Pa**@discussions.microsoft.com> wrote in message
> news:CF**********************************@microsof t.com...
> > What I am trying to do is as follows.
> > I have a page with 3 links,that direct the user to 3 different pages

when
> selected after login.
> > So all link selections will first direct the user to a login page.

Once
> the user logs in then they are directed to the appropriate link.
> > So for all 3 links they all go to a login page, but each link must

pass
> information to the login in page, specifically the page to go to after

login
> takes place.
> > --
> > Paul G
> > Software engineer.
>
>
>


Nov 18 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Jack Addington | last post: by
2 posts views Thread by Martin Tully | last post: by
2 posts views Thread by Vagabond | last post: by
reply views Thread by leo001 | last post: by

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.