• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2451
  • Last Modified:

Request is not available in this context [querystring]

I have a page, ModelProfileImages.aspx which passes modelid to an iframe            

<IFRAME src="thumb.aspx?page=1&modelid=" <%= Request.QueryString("modelid") %>
style="WIDTH: 537px; HEIGHT: 150px">width="700"
                                                                                    height="310" scrolling="auto" frameborder="0"> [Your user agent does not
                                                                                    support frames or is currently configured not to display frames. However, you
                                                                                    may visit <A href="foo.html">the related document.</A>] </IFRAME>

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="thumb.aspx.vb" Inherits="Pantiesism.thumb" enableSessionState=true%>
<%@ Import Namespace="System.IO" %>
<%@Import Namespace="System.Drawing.Imaging" %>
      <script language="vb" runat="server">

dim modelid=Request.QueryString("modelid")
 Dim PathVar as String = Server.MapPath(".") + "\ModelImages\" + modelid  + "\Images\"      


and i get the error Request is not available in this context. None of the code is in the codebehind on the thumbs page. What am i doing wrong?!?!
1 Solution
use Context.Request.QuertString("modelid")

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now