Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Response.Redirect Question

LEGEND ,
Nov 08, 2007 Nov 08, 2007
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


TOPICS
Server side applications
267
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 08, 2007 Nov 08, 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


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 08, 2007 Nov 08, 2007
LATEST
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
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines