|
| |
精品推荐 |
 |
|
| |
|
|
|
|
在ASP.NET中实现Model-View-Controller模式(1)
|
日期:2007年7月8日 作者: 查看:[大字体
中字体 小字体]
|
recordingSelect.DataBind(); } }
void SubmitBtn_Click(Object sender, EventArgs e) { String selectCmd = String.Format( "select * from Track where recordingId = {0} order by id", (string)recordingSelect.SelectedItem.Value);
SqlConnection myConnection = new SqlConnection( "server=(local);database=recordings;Trusted_Connection=yes"); SqlDataAdapter myCommand = new SqlDataAdapter(selectCmd, myConnection);
DataSet ds = new DataSet(); myCommand.Fill(ds, "Track");
MyDataGrid.DataSource = ds; MyDataGrid.DataBind(); }
#region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.submit.Click += new System.EventHandler(this.SubmitBtn_Click); this.Load += new System.EventHandler(this.Page_Load);
上一篇:使用ASP.NET中的一点体会[关于代码分离]
下一篇:在ASP.NET中实现Model-View-Controller模式(2)
|
| 相关文章: |
|
|
|
| 相关软件: |
|
|
|
|