Skip to main content
Inspiring
November 8, 2007
Question

Response.Redirect Question

  • November 8, 2007
  • 2 replies
  • 266 views
How do i create a response.redirect with a variable?

e.g.
<% If (Session("MM_username")) <>"" Then
Response.Redirect
"products.asp?CustomerID=(RSwelcome.Fields.Item("CustomerID").Value)"
End If
%>

This doesn't work
Thanks
Andy


This topic has been closed for replies.

2 replies

Inspiring
November 8, 2007
Ah!
Thanks for that, much appreciated.
Andy


"Joris van Lier" <whizzrd@hotmail.com> wrote in message
news:fgv2ms$3q9$1@forums.macromedia.com...
> "Andy" <andy@work.com> wrote in message
> news:fgv0n2$1ad$2@forums.macromedia.com...
>> How do i create a response.redirect with a variable?
>>
>> e.g.
>> <% If (Session("MM_username")) <>"" Then
>> Response.Redirect
>> "products.asp?CustomerID=(RSwelcome.Fields.Item("CustomerID").Value)"
>> End If
>> %>
>>
>> This doesn't work
>> Thanks
>> Andy
>
> ASP doesn't have variable parsing for strings, you have to concatenate the
> string.
> Response.Redirect "products.asp?CustomerID="&
> RSwelcome.Fields.Item("CustomerID").Value
>
>


Inspiring
November 8, 2007
"Andy" <andy@work.com> wrote in message
news:fgv0n2$1ad$2@forums.macromedia.com...
> How do i create a response.redirect with a variable?
>
> e.g.
> <% If (Session("MM_username")) <>"" Then
> Response.Redirect
> "products.asp?CustomerID=(RSwelcome.Fields.Item("CustomerID").Value)"
> End If
> %>
>
> This doesn't work
> Thanks
> Andy

ASP doesn't have variable parsing for strings, you have to concatenate the
string.
Response.Redirect "products.asp?CustomerID="&
RSwelcome.Fields.Item("CustomerID").Value