Results 1 to 8 of 8

Thread: [RESOLVED] Passing values from one page to another???

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Resolved [RESOLVED] Passing values from one page to another???

    I have a web page that contains a GridView which the user is allowed to "Edit", "Delete" and "Select" rows. What I'm trying to accomplish is when a user clicks on "Edit", they are redirected to another web page that contains a DetailsView of the record they selected from the GridView (previous page). How do I make the association?

    Thanks,
    Blake

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Passing values from one page to another???

    I hope you will populate the gridview from some data source, While clicking the edit button pass the ID of the row selected row either using QueryString/ViewState and fetch the value from db and display in the details view
    Please mark you thread resolved using the Thread Tools as shown

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: Passing values from one page to another???

    I'm not sure how to do that. Got any examples?
    Blake

  4. #4
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Passing values from one page to another???

    Here is the sample with edit in popup screen. Apply the same logic for your next page
    Please mark you thread resolved using the Thread Tools as shown

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

    Re: Passing values from one page to another???

    Blake,

    How are you binding the columns in the GridView currently?

    If you are using TemplateField's, or even a HyperLink Field, you should be able to manipulate the data that is being put into that column in the GridView RowDataBound event, to set the link, including the ID of the Item that you want to edit.

    Here are some examples:

    http://authors.aspalliance.com/aspxt...ogridview.aspx
    http://www.codeproject.com/KB/webfor...linkfield.aspx

    Gary

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

    Re: Passing values from one page to another???

    hey,
    i think this thread can help
    http://www.vbforums.com/showthread.p...25#post3825625
    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

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: Passing values from one page to another???

    Thanks guys,

    All your suggestions were helpful!
    Blake

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

    Re: [RESOLVED] Passing values from one page to another???

    you are welcome
    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