title: request querystring in variable
body: <p>hello iam trying to get the id from a url and send it to the clint side this is what i did </p>
  
  <p>this is my url :</p>
  
  <pre><code>http://localhost:53010/edit.aspx?Id=4
  </code></pre>
  
  <p>code behind </p>
  
  <pre><code>    Public Partial Class Edit
  Inherits System.Web.UI.Page
  
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) 
  Handles Me.Load
  
  End Sub
  Private _myId As String = Request.QueryString("id")
  
  Public Property myId() As String
      Get
          Return _myId
      End Get
      Set(ByVal value As String)
          _myId = value
      End Set
  End Property
  </code></pre>
  
  <p>End Class
  client </p>
  
  <pre><code>&lt;%= myId%&gt;
  </code></pre>
  
  <p>error </p>
  
  <pre><code>Request is not available in this context
  </code></pre>
  
  <p>this is also what i get when i move the private prop to page_load() 
     "private " is not valid on local variable declaration –
  any idea what is going on </p>
  
  <p>Thanks </p>
  
  <hr>
  
  <p>i solve this problem here is the answer </p>
  
  <pre><code>Public Partial Class Edit
  Inherits System.Web.UI.Page
  
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) 
  Handles Me.Load
      MyIdVal = Request.QueryString("id")
  
  
  End Sub
  
  Private _myIdVal As String
  Public Property MyIdVal() As String
      Get
          Return _myIdVal
      End Get
      Set(ByVal value As String)
          _myIdVal = value
      End Set
  End Property
  </code></pre>
  
  <p>End Class</p>