Results 1 to 7 of 7

Thread: Hyperlinks that pass additional values

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2010
    Posts
    90

    Hyperlinks that pass additional values

    Hi all,

    I guarantee the title of my thread does not explain what I am looking for, but I just can't think of a better way to word it.

    What I have right now is an application that the user can add, search, and update various orders in the System. I've been working on the front end page, and wanted to display a summary of all orders performed this month. Right now the Orders are represented as labels (based on data pulled from the database). What i'd like to do is replace these labels with hyperlinks. I was hoping that by doing that I could somehow write some code so that when an order is clicked that the user is taken directly to the search page and that order is displayed. Is this possible to do?

    The other issue I can see is that right now the following steps are needed on the Search page:
    1 - The user enters search criteria and clicks the Search button. This is turn displayed a GridView.
    2 - The user selects an item from the Grid, which then turns all of the fields to be Visible.

    I'm not sure if any of this is possible, but appreciate the help.

    Thanks!

  2. #2
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    Re: Hyperlinks that pass additional values

    hey,
    i don't actually think that i understand your Question,
    but if you asking that, you can pass variables through the Hyperlinks
    yes you can do this ..
    Code:
    string name = adamcm;
    HyperLink1.NavigateUrl = "search.aspx?Name=" + name;
    You Don't Have to Rate Me.
    I'm Not a Civilized Man I'm the Civilization it self
    White or Black, Living or Dieing and 0 or 1 that's MY life
    iam an Object in Object Oriented Life
    my blog : http://refateid.blogspot.com/
    twitter :@avrail
    010011000111010101110110001000000100110101111001001000000101000001100011

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2010
    Posts
    90

    Re: Hyperlinks that pass additional values

    Quote Originally Posted by avrail View Post
    hey,
    i don't actually think that i understand your Question,
    but if you asking that, you can pass variables through the Hyperlinks
    yes you can do this ..
    Code:
    string name = adamcm;
    HyperLink1.NavigateUrl = "search.aspx?Name=" + name;
    Thanks, that would work well if I created a specific URL each time an order is searched for. If i'm not mistaken, right now it only displays Search.asp no matter which order I select. So after searching, I select an Order from the Gridview and the order details populate throughout the form. After I select an item from the Gridview is it possible to create a specific URL (ie Search.aspx?ORderID=99)?

  4. #4
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    Re: Hyperlinks that pass additional values

    Quote Originally Posted by adamcm View Post
    Thanks, that would work well if I created a specific URL each time an order is searched for. If i'm not mistaken, right now it only displays Search.asp no matter which order I select. So after searching, I select an Order from the Gridview and the order details populate throughout the form. After I select an item from the Gridview is it possible to create a specific URL (ie Search.aspx?ORderID=99)?
    hey,
    try this link
    http://www.dotnetcurry.com/ShowArticle.aspx?ID=147
    i think this is what you are looking for, if not please let me know
    You Don't Have to Rate Me.
    I'm Not a Civilized Man I'm the Civilization it self
    White or Black, Living or Dieing and 0 or 1 that's MY life
    iam an Object in Object Oriented Life
    my blog : http://refateid.blogspot.com/
    twitter :@avrail
    010011000111010101110110001000000100110101111001001000000101000001100011

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Hyperlinks that pass additional values

    adamcm,

    Are you using the ASP.Net GridView control?

    If so, you should be able to set up a column as a HyperLinkField, then format the url that it is set to using the datanavigateurlformatstring and the datatextfield. You can find an example here:

    http://authors.aspalliance.com/aspxt...ogridview.aspx

    Or, you could do this work in the GridView's RowDataBound event, it is really up to you.

    Gary

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Hyperlinks that pass additional values

    I just checked avrail's link, and this is another example of doing exactly what I just said

    Let us know if you are having problems with this.

    Gary

  7. #7
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    Re: Hyperlinks that pass additional values

    hey,
    we didn't hear from you since my last post,
    do you still facing problems?
    You Don't Have to Rate Me.
    I'm Not a Civilized Man I'm the Civilization it self
    White or Black, Living or Dieing and 0 or 1 that's MY life
    iam an Object in Object Oriented Life
    my blog : http://refateid.blogspot.com/
    twitter :@avrail
    010011000111010101110110001000000100110101111001001000000101000001100011

Posting Permissions

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



Click Here to Expand Forum to Full Width