相关代码 |
|
Sub Page_Load Dim conPubs As SqlConnection Dim cmdSelect As SqlCommand conPUbs = New SqlConnection( "Server=localhost;UID=sa;PWD=secret;Database=Pubs" ) cmdSelect = New SqlCommand( "Select * From Titles", conPubs ) conPubs.Open() dgrdTitles.DataSource = cmdSelect.ExecuteReader() dgrdTitles.DataBind() conPubs.Close() End Sub DataGrid.aspx ID="dgrdTitles" EnableViewState="False" Runat="Server" />
相关资源 |
|