Posted on: 2/4/2014 2:57:55 PM | Views : 620

hi,
I have Gridview bound to database table called Models. The database table primary
key  is ModelId -   of Type GUID.

In the gridview  I have coverted the ModelId bound field to template
field and the Guid value now shows using a label control.

There is also another template field in the gridview  which has 2 buttons - approved and NotApproved

On the button click,  'I generate an email message in code behind that does the following
Gets User Name Passing in Label1.Text as GuId
Gets User Email

The problem is there are 50 rows in the gridview - how can I be sure to get the correct GUID from the row of the button that is being clicked?

here is my code



protected void Button1_Click(object sender, ImageClickEventArgs e) {

MailMessage mail = new Mai ...

Go to the complete details ...