how can i pass a value from one page to another

Results 1 to 3 of 3

Thread: how can i pass a value from one page to another

  1. #1
    Join Date
    Dec 1969

    Default how can i pass a value from one page to another

    i want to pass a value from one page to another without using the session and cookies. does it possible

  2. #2
    Join Date
    Dec 1969

    Default It does possible...

    Do a search on "QueryString"

  3. #3
    Join Date
    Dec 1969

    Default RE: QuertSting?

    If you eliminate session and cookies, you are left with either Cache or appending the values to the page call as a querystring.<BR><BR>response.redirect("Chart.aspx? Title=" & strTitle & "&intCounts=" & &#039;intCounts & "&strValues=" & strValues & " &strLabels=" & strLabels)<BR><BR>This line calls the page Chart.aspx which is local. The variables strTitle, intCounts and strValues are passed as querystring.<BR><BR>On the receiving page, the values are retrieved as follows:<BR><BR>Dim x As integer = Request.QueryString("intCounts")<BR>Dim strValues As String = Request.QueryString("strValues")<BR>Dim strLabels As String = Request.QueryString("strLabels")<BR><BR>Using Cache to store things is OK, but they are available to anyone on the system that calls them. Also, if multiple users are on the system with the same app you need to give the cached values unique names (usually by concatanating the session id to the value name). Otherwise different users walk all over each others values. It&#039;s not the best way to move data around pages.<BR><BR>Here a datagrid dataview is cached then retrieved for binding to a datagrid.<BR><BR>Cache.Add("DataView",objView, Nothing, DateTime.Now.AddMinutes(20), TimeSpan.Zero, CacheItemPriority.High, Nothing)<BR><BR>dgData.DataSource = Cache.Get("DataView")<BR><BR>Other than the those four methods, I don&#039;t think there is any other way to have data from one page get to another.<BR><BR>Good luck<BR>Tt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts