打印本文 打印本文 关闭窗口 关闭窗口
在ASP.NET中实现MVC模式(四)
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1953  更新时间:2009/4/23 10:46:30  文章录入:mintao  责任编辑:mintao
      {

         DataSet ds = DatabaseGateway.GetRecordings();

         recordingSelect.DataSource = ds;

         recordingSelect.DataTextField = "title";

         recordingSelect.DataValueField = "id";

         recordingSelect.DataBind();

      }

   }

 

   void SubmitBtn_Click(Object sender, EventArgs e)

   {  

      DataSet ds =

         DatabaseGateway.GetTracks(

         (string)recordingSelect.SelectedItem.Value);

 

      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);

 

   }

   #endregion

}

 

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口