How to get the variable in the URL?help me please

Results 1 to 6 of 6

Thread: How to get the variable in the URL?help me please

  1. #1
    Join Date
    Dec 1969
    Posts
    116

    Default How to get the variable in the URL?help me please

    I have a URL from previous page which says &#060;a href=abc.asp?branch=branchname&#062;&#060;/a&#062;<BR>branch name is coming from the database, I need this branch name to be passed to the next page so that I can use that one in the Where class to get other fields from the Database. How do I do this I am using Request.Querysting("branch") in the next page and trying to store it in a variable, but it is not recognizing branch at all. I am kinda new to ASP so Can some one help me please<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    572

    Default RE: How to get the variable in the URL?help me ple

    Try this:<BR>&#060;a href="abc.asp?branch=&#060;%=branchname%&#062;"&#0 62;&#060;/a&#062;<BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    116

    Default RE: How to get the variable in the URL?help me ple

    Well this works in the current page, but I want to pass the branch to the next page as a variable so that I can use that one to get certain fields from the database using that in the Where clause.

  4. #4
    Join Date
    Dec 1969
    Posts
    119

    Default RE: How to get the variable in the URL?help me ple

    &nbsp;<BR> Pass the Branchname value to the next page in which<BR> u want to use thorugh a querystring like which u used before..<BR><BR> if u want to use branchname value in multiple pages store<BR> the value in a session variable..<BR><BR> I hope this will help you


  5. #5
    Join Date
    Dec 1969
    Posts
    572

    Default RE: How to get the variable in the URL?help me ple

    You can&#039t pass the variable to the page, you can pass it&#039s value, and in the next page you can either assign it to the local variable, or use it directly by Request("VariableName")

  6. #6
    Join Date
    Dec 1969
    Posts
    116

    Default RE: How to get the variable in the URL?help me ple

    Now I am storing branchname value which is coming from a recordset in a variable, but this is under while loop so when it comes out I don&#039t see any thing stored, how do I do this.

Posting Permissions

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