troubleshooting Question

Extracting parameter from url - request querystring problem

Avatar of Overthere
Overthere asked on
ASPASP.NET
10 Comments3 Solutions428 ViewsLast Modified:
Hello folks,

   I have created a simple aspx page in which I pass a parameter to it from another page (id) that I wish to extract and then display the right image etc.
However, it is always defaulting to the case else statment and the var catid is blank when I display it. I t is being passed correctly by the preceding page.
What am I doing wrong?




<!DOCTYPE HTML >
<html lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"  >
<link href="css/gallerypg.css" rel="stylesheet" type="text/css">

<script type=text/javascript>

    function md(e) {
        try { if (event.button == 2 || event.button == 3) return false; }
        catch (e) { if (e.which == 3) return false; }
    }
    document.oncontextmenu = function () { return false; }
    document.ondragstart = function () { return false; }
    document.onmousedown = md;
 
 </script>
<%
    Dim vpic As String
    Dim vpage As String
 
    Dim catid = Request.QueryString("id")
   
    Response.Write("catid") 'display the value passed

    Select Case "catid"
        Case "afrik"
            vpic = "images/largeafrikanique.jpg"
            vpage = "ppafrik.html"
        Case "alien"
            vpic = "images/largeaalien.jpg"
            vpage = "ppalien.html"
        Case "angelic"
            vpic = "images/largeangelic.jpg"
            vpage = "ppangel.html"
        Case "argonaut"
            vpic = "images/largeargonaut.jpg"
            vpage = "ppargo.html"
        Case "ascen"
            vpic = "images/largeascension.jpg"
            vpage = "ppascen.html"
        Case "azure"
            vpic = "images/largezure.jpg"
            vpage = "ppascen.html"
        Case "cave"
            vpic = "images/largecave.jpg"
            vpage = "ppcave.html"
        Case "emerge"
            vpic = "images/largeemerge.jpg"
            vpage = "ppemerge.html"
        Case "fire"
            vpic = "images/largefire.jpg"
            vpage = "ppfire.html"
        Case "flight"
            vpic = "images/largeflight.jpg"
            vpage = "ppflight.html"
        Case "gossamer"
            vpic = "images/largegrossamer.jpg"
            vpage = "ppgross.html"
        Case "jam"
            vpic = "images/largejam.jpg"
            vpage = "ppjam.html"
        Case "journey"
            vpic = "images/largejourney.jpg"
            vpage = "ppjourney.html"
        Case "martian"
            vpic = "images/largemartian.jpg"
            vpage = "ppmartian.html"
        Case "mess"
            vpic = "images/largemess.jpg"
            vpage = "ppmess.html"
        Case "phantom"
            vpic = "images/largephantom.jpg"
            vpage = "ppphantom.html"
        Case "phase"
            vpic = "images/largephase.jpg"
            vpage = "ppphase.html"
        Case "port"
            vpic = "images/largeport.jpg"
            vpage = "ppport.html"
        Case "reef"
            vpic = "images/largereef.jpg"
            vpage = "ppreef.html"
        Case "sun"
            vpic = "images/largesunship.jpg"
            vpage = "ppsun.html"
        Case "voyager"
            vpic = "images/largevoyager.jpg"
            vpage = "ppvoyager.html"
        Case "warp"
            vpic = "images/largewarp.jpg"
            vpage = "ppwarp.html"
        Case "watcher"
            vpic = "images/largewatcher.jpg"
            vpage = "ppwatcher.html"
        Case Else
            vpic = "images/largeafrikanique.jpg"
            vpage = "ppafrik.html"
    End Select
       
   
    %>
</head>
<body >
<img  class="galleryhdr" src="images/largeheader.jpg" width="955px" border=0  align="top" usemap="#Map2" alt="">
<img  class="gallerypic" src= <%=vpic%> width="955"  height="861" border=0 align="top"  alt="">
<map name="Map2">
  <area shape="rect" coords="23,37,107,72" href="default2.html"  title="HomePage" alt="Home Page">
  <area shape="rect" coords="124,35,198,66" href="aboutsel.html"  title="" alt="About Selywn Lissack">
  <area shape="rect" coords="222,32,418,68" href="premire.html"  title=" "alt="Premier Holograms">
  <area shape="rect" coords="448,36,596,69" href="pgsel1.html"  title=" "alt="Art Holograms">
  <area shape="rect" coords="624,36,725,72" href="digitalmain.html"   title=" "alt="Digital Art">
  <area shape="rect" coords="750,39,821,66" href="mainmusic.html"  title="Music" alt="Music">
  <area shape="rect" coords="836,35,959,65" href="contactus.html"  Title="Contact Us" alt="Contact Us">
  <area shape="rect" coords="751,217,958,272" href=<%=vpage %>   title="" alt="Buy Now">
  <area shape="rect" coords="29,204,214,249" href="digitalmain.html"  title="" alt="Gallery">
</map>
<center>
</center>
</body>
</html>
ASKER CERTIFIED SOLUTION
Overthere

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros