Create a pop-up window in DataGrid
Author: wyhw Posted: 2003-8-1 Recommended Level: ★ View author information and author anthology
Create a pop-up window of the DataGrid: Herd proposal from DotNetJunkie of this article. He originally writes the letter to provide an example of how to create HyperLinkColumn in DataGrid, you can open a new window after the user clicks this column, showing the details of this column. We have answered them through Email, he suggested that we have added this method to their guidelines, so there is this article. Like our original article, it is very simple, but simple-containing method examples can sense developers more effectively. This example contains two WebForms and a CSS file (all code can be downloaded) - the first WebForm contains a DataGrid of the product list read from the Northwind library, and HyperLink's State is set to "SEEDETAILS", once this The link is clicked, and the JavaScript clip will call. The user wants to get the product's ProductID as a parameter in the URL. The second WebForms containing another DataGrid lists all the specific users of the product. detail.
Let's take a look at DataGrid-Open.aspx.csdataGrid-open.aspx.csdataGrid-open.aspx <% @ page language = "c #" codebehind = "DataGrid-open.aspx.cs" autoeventwireup = "inherits =" Study.DataGrid_open "%>
"ITemStylehyperLink" /> (.../columns>/asp:dataGrid> "/HTMLDATAGRID-Open.aspx.csusing system; using system.collections; using system.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System. Data.SqlClient; Namespace Study {///
/// summary> private () {this.load = new system.eventhandler (this.page_load);} #ENDREGON}} In addition to DataNavigateURLFORMATSTRING does not have any difficulties, you can notice that I actually use directly. A JavaScript fragment (Note: You can also create a .js file or use