Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

<asp:GridView ID="GridView1" runat="server">

<Columns>
<asp:TemplateField HeaderText="Logged Ticket">
<ItemTemplate>
<asp:LinkButton ID=btnview runat=server Text="View Detail" OnClient
Click='<%# "return GoToNextPage("+ "http://" + Eval("Description")+")" %>'>
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

Solution 3

.
Add OnItemCommand="grdAppCond_ItemCommand" to Grid Tag on your aspx page. The fo
llowing method will be invoked. Check that e.CommandName is equal to the text of
cell of your grid.

Hide Copy Code


protected void grdAppCond_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == "Open Window")
{
this.OpenWindow();
}
}
Add the following method to your .cs file. This method will call the javascript
funtion openPopup.
Hide Copy Code
private void OpenWindow()
{
string script = "<script language="'javascript'" type='text/javascript'>openPopu
p()</script>";
ClientScript.RegisterStartupScript(this.GetType(), "
openPopup", script);
}
Now in your aspx page add the following code (batter on end).
Hide Copy Code
<script type="text/javascript">
function openPopup() {
var id = '<%= id%>';
var url = quot;WindowPath.aspx?ID=quot; + id;
window.open(url, &quot;window1&quot;, &quot;scrollbars=1, width=950p
x, height=560px, resizable=0&quot;);
}
</script>

Now you can get the id on your target page using Query String

You might also like