How to NAvigate this [Resolved]

Posted by Jayakumars under ASP.NET AJAX on 3/22/2013 | Points: 10 | Views : 1652 | Status : [Member] [MVP] | Replies : 1
hi
I have gridview with Images i Binded like this


<asp:Image ID="Image1" Width ="35" Height ="35" runat="server" DescriptionUrl ="~/FrmurlName.aspx"
ImageUrl='<%# String.Format("~/Images/" + Eval("img1")) %>' />

here i when i click this image i need navigate to other page how will do this.

Mark as Answer if its helpful to you

Kumaraspcode2009@gmail.com



Responses

Posted by: Jayakumars on: 3/22/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down

Resolved
Javascript
==============

function PassUrl(UrlName) {
window.open(UrlName, 'Urlname', 'height=300px,width=300px,toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no,modal=yes,resizable=no,copyhistory=no,maximize=0;minimize=1;');
}


Server Side.
=============
Grid RowDataBound

if (e.Row.RowType == DataControlRowType.DataRow) {
Label lbllinkname = e.Row.FindControl("lbllinkUrlName");
string Urlname = lbllinkname.Text;

Image Imge11 = e.Row.FindControl("Image1");
Image11.Attributes.Add("onclick", "PassUrl('" + Urlname + "');");

}




Mark as Answer if its helpful to you

Kumaraspcode2009@gmail.com

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

Login to post response