Selecting a value from a Gridview Control

H

hledman

I'm trying to get a value from a gridview control and put that value in
a query string. I have a select button on the gridview and once the
user hits the select button i want to capture the the userid. Here's
some example code and you can see where i'm trying to do this in on the
line that starts with Response.Redirect:

protected void SearchUserMenu_MenuItemClick(object sender,
MenuEventArgs e)
{
if (GridView1.SelectedIndex > -1)
{
switch (e.Item.Text)
{
case "Security User":
Response.Redirect("~/SecurityUser.aspx?userID=" +
GridView1.SelectedRow.DataItem);
break;
case "WFM User Group/Location":
break;
case "Maintain User":
break;
case "Add User":
break;
}
}
}

any suggestions would be great.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top