codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Response.Redirect  Medatron at 06:09 on Saturday, October 04, 2003
 

With this command, is it possible to use a declared variable a part of the url? i.e. Reponse.Redirect <%variable%>.htm

Thanks in advance

  Re: Response.Redirect  Jeff Anderson at 09:40 on Saturday, October 04, 2003
 

Medatron - absolutely.


<%
url="http://www.codetoad.com/"
Response.redirect url
%>


or even

<%
url_start="http://"

url_end = "www.codetoad.com/"

Response.redirect url & url_end
%>


or

<%

url_end = "www.codetoad.com/"

Response.redirect "http://" & url_end
%>




  Re: Response.Redirect  Medatron at 01:20 on Sunday, October 05, 2003
 

I should have provided more information.

What I am trying to do is get a login page to redirect to another page that as part of the url has a value I pull from a database.

sql = "select Something from Database where Username = '" & LCase(username) & "'"
sql = sql & " and Password = '" & LCase(userpwd) & "'"


Then as part of the Response.Redirect URL insert the Something pulled from the database.

Does that make sense?

Thanks again.

<Added>

It would look like Response.Redirect http://www.them.com/something.htm

  Re: Response.Redirect  Sinny at 15:04 on Friday, October 10, 2003
 

Same thing:

set myRecordSet = Database.Execute(sql)

set myURL = myRecordSet("something")

Response.Redirect("http://www.them.com/" & myURL & ".htm")


VBScript will resolve whatever you pass into Response.Redirect() into a string before it tries to move along.

  Re: Response.Redirect  Webby at 15:39 on Monday, December 22, 2003
 

What if you don't know what any part of the url will be except for the "http://" part?








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Cadenas.CoCreate.FTI.IMSI.CADCAM.DELCAM.GMI.PLAXIS
•  Cadenas.CoCreate.FTI.IMSI.CADCAM.DELCAM.GMI.PLAXIS
•  Schlumberger.PTC.Siemens.EDS.CATIA.CIMATRON.AUTODESK
•  PDMS.Plate.UGS.CYME.FLOMERICS.Tanner.LINUX.MAC.UNIX
•  Tanner.CrossLight.Elite.Software.Geocentrix.FLOW.3D.PTC.
•  ITTVIS.ENVI.Leica.Erdas.LEAP.SOFTWARE.MapInfo.Nobeltec.
•  Re: Cracked software ftp download 2013
•  Re: Crack Engineering Software
•  Full engineering software


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2013