G
glbdev
Hi,
I posted this question yesterday but didn't get the answer I needed.
I am DESPERATE to get this working so I'm re-posting it because I
don't think I worded it correctly.
I have a GridView which is databound to a table. All the data is
being pulled correctly so there is no problem there.
On each row I have an image button which is attached to a
DataTextField, pulling up a uniqueidentifier for that record. Here is
the HTML for it:
<ASP:BUTTONFIELD BUTTONTYPE="Image" IMAGEURL="~/images/ViewEmps.gif"
TEXT="Button" DATATEXTFIELD="EmployeeNumber"
COMMANDNAME="EmplayeeDetails">
<ITEMSTYLE HORIZONTALALIGN="Center" VERTICALALIGN="Middle"
WRAP="False" />
</ASP:BUTTONFIELD>
When I hover above this button it shows me the correct DataTextField
value for each row. I have the code in place so that when the user
clicks on this button it redirects them to another page. No problem,
everythings fine to this point.
The problem I am having is that I need to get the DATATEXTFIELD value
from the button so I can use it as part of a querystring, such as:
Response.Redirect("EmployeeDetails.aspx?id=" +
button_datatextfield_value)
How can I get this DATATEXTFIELD value? Can anyone help with this?
Again, sorry for the re-post but I, obviously, didn't explain the
problem correctly and I am desperate to get this working since I am
going to be using gridviews on several different pages and am stuck
without it working correctly.
Thanks,
Steve
I posted this question yesterday but didn't get the answer I needed.
I am DESPERATE to get this working so I'm re-posting it because I
don't think I worded it correctly.
I have a GridView which is databound to a table. All the data is
being pulled correctly so there is no problem there.
On each row I have an image button which is attached to a
DataTextField, pulling up a uniqueidentifier for that record. Here is
the HTML for it:
<ASP:BUTTONFIELD BUTTONTYPE="Image" IMAGEURL="~/images/ViewEmps.gif"
TEXT="Button" DATATEXTFIELD="EmployeeNumber"
COMMANDNAME="EmplayeeDetails">
<ITEMSTYLE HORIZONTALALIGN="Center" VERTICALALIGN="Middle"
WRAP="False" />
</ASP:BUTTONFIELD>
When I hover above this button it shows me the correct DataTextField
value for each row. I have the code in place so that when the user
clicks on this button it redirects them to another page. No problem,
everythings fine to this point.
The problem I am having is that I need to get the DATATEXTFIELD value
from the button so I can use it as part of a querystring, such as:
Response.Redirect("EmployeeDetails.aspx?id=" +
button_datatextfield_value)
How can I get this DATATEXTFIELD value? Can anyone help with this?
Again, sorry for the re-post but I, obviously, didn't explain the
problem correctly and I am desperate to get this working since I am
going to be using gridviews on several different pages and am stuck
without it working correctly.
Thanks,
Steve