How to View Image from Gridview to modalpopup

Posted by Jayakumars under ASP.NET on 11/1/2011 | Points: 10 | Views : 1884 | Status : [Member] [MVP] | Replies : 2
hi

I am bind the record to Gridview. When i Click Gridview i need show corresponding image show my modalpopup. I have already inserted to image to my database how will do this.

Mark as Answer if its helpful to you


Responses

Posted by: Abdulhaknet on: 11/1/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Friend,

1. place DIV control with absolute position.
2. write / call javascript like below. in GridView1_RowDataBound

iam writing code for change background. you can alter for image
-------------------------------------------------------------------------------------------
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.originalstyle=this.style.backgroundColor;this.style.backgroundColor='#DDDDDD'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.originalstyle");
e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.GridView1, "Select$" + e.Row.RowIndex);
}

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 11/1/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

I need how to show byte image show modalpopup how will do this.

Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response