Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You're redirecting before you set the session.</p> <p>Also, you can more easily pickup the value in Form2.aspx.vb by just doing:</p> <pre><code>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim field4 As String = Request.Querystring("id") Parking_ID1.Text = field4 </code></pre> <p>You'll have to forgive my VB.net syntax, long time since I used it, but the concept should work for you.</p> <p>Extending the answer based upon a request from the poster:</p> <p>Should you wish to pass multiple parameters across, there are a few ways of doing it, though your model is the right basis for this:</p> <pre><code>Protected Sub repeater1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles repeater1.ItemCommand Dim value As Int32 = Convert.ToInt32(e.CommandArgument) Dim dataItem as YourStronglyTypedItem = e.Item.DataItem as YourStronglyTypedItem // c# there - sorry Session("field4") = dataItem.Property1 Session("field5") = dataItem.Property2 // etc. Response.Redirect("form2.aspx?Parking_ID=" &amp; value &amp; "&amp;OtherProperty=" &amp; dataItem.Property2) </code></pre> <p>The syntax isn't ideal (and some of it is in c#, sorry!), but essentially, if you can grab the bound data item (through e.Item.DataItem) and cast it to whatever object you bound in the first place then you can grab as many properties from it as you like.</p> <p>So say you databound List to it. e.Item.DataItem cast to Widget will give you the values of that particular widget, then you can either set multiple session values (or indeed just put the whole widget into session), or you can pass multiple query string parameters as I have done above.</p> <p>hope that helps? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload