473,405 Members | 2,279 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,405 software developers and data experts.

vb Re-direct script

Evenin,

The code re-directs to a default.aspx page but what would I add to direct to
another page? (Thanks all)

<%
if dsLogin.RecordCount > 0 then
Session("sessUsername") = Request.Form("tfUsername")
FormsAuthentication.RedirectFromLoginPage("tfUsern ame.value", true )
else if ((Request.Form("tfUsername"))) <> Nothing OR
((Request.Form("tfPassword"))) <> Nothing
response.Write("Login Failed. Please Try Again.")
end if
%>
Nov 19 '05 #1
5 1126
Dam:
Check out: http://geekswithblogs.net/ranganh/ar.../25/37612.aspx

RedirectFromLoginPage internally calls two method, SetAuthCookie and
Response.Redirect. You can use these two methods yourself and thus control
where the Response.Redirect goes to...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Dam6" <da****@excalibur.force8.net> wrote in message
news:mJ********************@pipex.net...
Evenin,

The code re-directs to a default.aspx page but what would I add to direct
to another page? (Thanks all)

<%
if dsLogin.RecordCount > 0 then
Session("sessUsername") = Request.Form("tfUsername")
FormsAuthentication.RedirectFromLoginPage("tfUsern ame.value", true )
else if ((Request.Form("tfUsername"))) <> Nothing OR
((Request.Form("tfPassword"))) <> Nothing
response.Write("Login Failed. Please Try Again.")
end if
%>

Nov 19 '05 #2
Thanks!!!
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OL**************@TK2MSFTNGP15.phx.gbl...
Dam:
Check out: http://geekswithblogs.net/ranganh/ar.../25/37612.aspx

RedirectFromLoginPage internally calls two method, SetAuthCookie and
Response.Redirect. You can use these two methods yourself and thus
control where the Response.Redirect goes to...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Dam6" <da****@excalibur.force8.net> wrote in message
news:mJ********************@pipex.net...
Evenin,

The code re-directs to a default.aspx page but what would I add to direct
to another page? (Thanks all)

<%
if dsLogin.RecordCount > 0 then
Session("sessUsername") = Request.Form("tfUsername")
FormsAuthentication.RedirectFromLoginPage("tfUsern ame.value", true )
else if ((Request.Form("tfUsername"))) <> Nothing OR
((Request.Form("tfPassword"))) <> Nothing
response.Write("Login Failed. Please Try Again.")
end if
%>


Nov 19 '05 #3
My actual situation involves being verified and then the url states this:

http://localhost/Modify/login.aspx?R...2fDefault.aspx

so at the mo it goes nowhere... hence the question of telling the
re-direction where to go... What have I missed?


"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OL**************@TK2MSFTNGP15.phx.gbl...
Dam:
Check out: http://geekswithblogs.net/ranganh/ar.../25/37612.aspx

RedirectFromLoginPage internally calls two method, SetAuthCookie and
Response.Redirect. You can use these two methods yourself and thus
control where the Response.Redirect goes to...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Dam6" <da****@excalibur.force8.net> wrote in message
news:mJ********************@pipex.net...
Evenin,

The code re-directs to a default.aspx page but what would I add to direct
to another page? (Thanks all)

<%
if dsLogin.RecordCount > 0 then
Session("sessUsername") = Request.Form("tfUsername")
FormsAuthentication.RedirectFromLoginPage("tfUsern ame.value", true )
else if ((Request.Form("tfUsername"))) <> Nothing OR
((Request.Form("tfPassword"))) <> Nothing
response.Write("Login Failed. Please Try Again.")
end if
%>


Nov 19 '05 #4
I'm not sure I understand, but you should simply be able to do a
response.redirect as you always would. If you need to set an authentication
cookie use SetAuthCookie.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Dam6" <da****@excalibur.force8.net> wrote in message
news:VZ********************@pipex.net...
My actual situation involves being verified and then the url states this:

http://localhost/Modify/login.aspx?R...2fDefault.aspx

so at the mo it goes nowhere... hence the question of telling the
re-direction where to go... What have I missed?


"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OL**************@TK2MSFTNGP15.phx.gbl...
Dam:
Check out:
http://geekswithblogs.net/ranganh/ar.../25/37612.aspx

RedirectFromLoginPage internally calls two method, SetAuthCookie and
Response.Redirect. You can use these two methods yourself and thus
control where the Response.Redirect goes to...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Dam6" <da****@excalibur.force8.net> wrote in message
news:mJ********************@pipex.net...
Evenin,

The code re-directs to a default.aspx page but what would I add to
direct to another page? (Thanks all)

<%
if dsLogin.RecordCount > 0 then
Session("sessUsername") = Request.Form("tfUsername")
FormsAuthentication.RedirectFromLoginPage("tfUsern ame.value", true )
else if ((Request.Form("tfUsername"))) <> Nothing OR
((Request.Form("tfPassword"))) <> Nothing
response.Write("Login Failed. Please Try Again.")
end if
%>



Nov 19 '05 #5

Found what was wrong from the books appended mistakes page while looking on
the web:

forms name = " SECAUTH " loginUrl="login.aspx">
not
forms name = " .SECAUTH " loginUrl="login.aspx">

take out the full stop and it all works.
Nov 19 '05 #6

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

Similar topics

1
by: Chris | last post by:
Sorry to post so much code all at once but I'm banging my head against the wall trying to get this to work! Does anyone have any idea where I'm going wrong? Thanks in advance and sorry again...
11
by: James | last post by:
My form and results are on one page. If I use : if ($Company) { $query = "Select Company, Contact From tblworking Where ID = $Company Order By Company ASC"; }
1
by: John Ryan | last post by:
What PHP code would I use to check if submitted sites to my directory actually exist?? I want to use something that can return the server code to me, ie HTTP 300 OK, or whatever. Can I do this with...
10
by: James | last post by:
What is the best method for creating a Web Page that uses both PHP and HTML ? <HTML> BLA BLA BLA BLA BLA
8
by: Beowulf | last post by:
Hi Guru's, I have a query regarding using PHP to maintain a user profiles list. I want to be able to have a form where users can fill in their profile info (Name, hobbies etc) and attach an...
8
by: Lothar Scholz | last post by:
Because PHP5 does not include the mysql extension any more is there a chance that we will see more Providers offering webspace with Firebird or Postgres Databases ? What is your opinion ? I must...
1
by: joost | last post by:
Hello, I'm kind of new to mySQL but more used to Sybase/PHP What is illegal about this query or can i not use combined query's in mySQL? DELETE FROM manufacturers WHERE manufacturers_id ...
3
by: presspley | last post by:
I have bought the book on advanced dreamweaver and PHP recently. I have installed MySQL and PHP server but am getting an error on the $GET statement show below. It says there is a problem with...
2
by: sky2070 | last post by:
i have two file with jobapp.html calling jobapp_action.php <HTML> <!-- jobapp.html --> <BODY> <H1>Phop's Bicycles Job Application</H1> <P>Are you looking for an exciting career in the world of...
1
by: Brian | last post by:
I have an array like this: $events = array( array( '2003-07-01', 'Event Title 1', '1' //ID Number (not unique) ), array( '2003-07-02',
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.