Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8107597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:49:32+00:00 2026-06-06T00:49:32+00:00

I’ve been stuck on this for hours, first time post. I Don’t know how

  • 0

I’ve been stuck on this for hours, first time post. I Don’t know how to grab the value and postback to a new page with the selected row. I’ll be displaying the information in new page on it’s own (a detailed view if you will)

<asp:GridView ID="GameSearchGrid" runat="server"
AllowPaging = "True" AllowSorting = "True" 
    DataSourceID="EntityDataSource1" Width="502px" AutoGenerateColumns="False" >
    <Columns>
        <asp:CommandField ShowSelectButton="True" />
        <asp:BoundField DataField="SKU" HeaderText="SKU" ReadOnly="True" 
            SortExpression="SKU" Visible="false" />
        <asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True" 
            SortExpression="Name" />
        <asp:BoundField DataField="GSystem" HeaderText="GSystem" ReadOnly="True" 
            SortExpression="GSystem" />
        <asp:BoundField DataField="Rating" HeaderText="Rating" ReadOnly="True" 
            SortExpression="Rating" />
        <asp:ButtonField ButtonType="Button" HeaderText = "select" Text="Select" 
        />
    </Columns>
</asp:GridView>

<asp:EntityDataSource ID="EntityDataSource1" runat="server" 
    ConnectionString="name=GameExpressEntities" 
    DefaultContainerName="GameExpressEntities" EnableFlattening="False" 
    EntitySetName="Games" 
    Select="it.[SKU], it.[Name], it.[GSystem], it.[Rating]" OrderBy="it.[Name]">
</asp:EntityDataSource>
//------------------------------------------------

void GameSearchGrid_SelectedIndexChanged(object sender, EventArgs e)
{
    GridViewRow row = GameSearchGrid.SelectedRow;
    Response.Redirect("~/GameDetailView.aspx");
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T00:49:34+00:00Added an answer on June 6, 2026 at 12:49 am

    You can access bound fields using the Cells property on the row. The Cells property can only access cells by numerical index, so you would need to know the index of the column you want to access. For instance:

    string skuCellValue = row.Cells[0].Text;
    

    If you don’t want to hard code the index you can look it up from the Columns property on the GridView by, for example, matching the HeaderText:

    GridViewRow row = GameSearchGrid.SelectedRow;
    GridView gv = (GridView)row.Parent.Parent;
    
    int colIndex = -1;
    for (int i = 0; i < gv.Columns.Count; i++)
    {
        if (gv.Columns[i].HeaderText == "SKU")
        {
            colIndex = i;
            break;
        }
    }
    
    // handle case when correct column was not found
    
    string skuCellValue = row.Cells[colIndex].Text;
    

    After that you can go ahead and redirect to the new page. Probably you would want to supply the found SKU value in the querystring:

    Response.Redirect("~/GameDetailView.aspx?SKU=" + skuCellValue);
    

    Note that redirecting will cause the browser to issue a new request (a GET request), so the page you are redirecting to will not have access to the post data or any other data from the page before (with the exception of the SKU in the query string which is explicitly passed along).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.