SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2012
    Location
    Manchester
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Passing a query string from one page to another C# .NET

    Hi

    Im trying to find out how to create a query string an assign to content on a page - so for example i have a list of bookings with event title, category and location, and on each list element there is a book now button that will popup and display a form with the values already showing in the input fields. I want to pass those details using hidden input fields but im slighlty confused on how to go about this?

    Most examples i have seen they show the URL with the query string in there - dont know whether this is pre-loaded or is loaded when they do
    Code:
    Response.Redirect("www.url.com?contenthere");
    I know you can use
    Code:
    string site = Request.QueryString["value"];
    Any guidance would be appreciated.

    Thanks.

  2. #2
    Non-Member
    Join Date
    Oct 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mj_coder View Post
    Hi

    Im trying to find out how to create a query string an assign to content on a page - so for example i have a list of bookings with event title, category and location, and on each list element there is a book now button that will popup and display a form with the values already showing in the input fields. I want to pass those details using hidden input fields but im slighlty confused on how to go about this?

    Most examples i have seen they show the URL with the query string in there - dont know whether this is pre-loaded or is loaded when they do
    Code:
    Response.Redirect("www.url.com?contenthere");
    I know you can use
    Code:
    string site = Request.QueryString["value"];

    Any guidance would be appreciated.

    Thanks.


    yes there are two ways of doing that in my knowledge..i think most easy in them is View control....
    1) you will mind view control in asp.net...which means when you will put one values in input fields then you will take that value and set those values as label control text in 2nd view which will popup like
    "Label1.Text= InputTexbox1.Text;"
    2) you shout use J query and Master and Content page in this situation that when you pop up the page it take value from content page or from, master page ..cause content page might be change but master page will b that only one and you can have more multi master pages in a project

    regards
    Andy
    <snip>
    Last edited by TechnoBear; Oct 29, 2012 at 06:36. Reason: Please wait 90 days for a real signature

  3. #3
    SitePoint Member
    Join Date
    Aug 2012
    Location
    Manchester
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you for that - would like to update the thread as answered - i've managed to get it done and works perfectly. Quite impressive


Bookmarks

Posting Permissions

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