passing value to redirect

L

Laura K

I know this is basic but I just can not get my head around it.

I would like to take a querystring and from that querystring redirect the
user to a specific page. I set up a simple test and I am doing something
wrong. Kinda a newbie here so here it goes.

I have tested the querystring by passing it to a label to make sure it is
correct and the querystring that I have been testing this with is 7jackets.
The redirect takes me to the case else option (the index page).

I have tried this with if/than and now with case....

Ideas?

Here is the code.

<script runat="server">

sub page_load()
dim strQueryvalue as string

strQueryValue = (Request.QueryString("strCssPath")) &
(Request.QueryString("strSubCategory"))


Select case strQueryValue

Case "7jackets"
response.redirect("redirection/pants.aspx")
case "5boots"
response.redirect("redirection/shoes.aspx")
case else
response.redirect("index.aspx")

end select

end sub


</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top