Home > ASP.Net, Javascript > Open Popup Window with HyperLink inside GridView

Open Popup Window with HyperLink inside GridView


Hi

try these examples:

<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl=<%# String.Format("javascript:void(window.open('http://www.{0}.com'))", Eval("ProductID")) %>> HyperLink</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>

//———Or  this example——

<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl=<%# String.Format("javascript:void(window.open('image.aspx?PId={0}',null,'left=45px,top=15px, width=300px, height=300px,status=no, resizable= yes, scrollbars=yes, toolbar=no, location=no,menubar=no'))",Eval("Image", "~/Car_Image/{0}")) %>>View Image</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>

Good Luck

Advertisements
Categories: ASP.Net, Javascript

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: