using 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; Namespace TestWebService {/// /// WebForm1 summary. /// summary> public class WebForm1: System.Web.UI.Page {protected System.Web.UI.WebControls.Button Button1; protected System.Web.UI.WebControls.TextBox TextBox1; protected System.Web.UI. WebControls.TextBox TextBox2; protected System.Web.UI.WebControls.TextBox TextBox3; protected System.Web.UI.WebControls.TextBox TextBox4; protected System.Web.UI.WebControls.Label Label1; protected System.Web.UI.WebControls. DataGrid DataGrid1; protected System.Web.UI.WebControls.TextBox TextBox5; protected System.Web.UI.WebControls.TextBox Textbox6; private void Page_Load (object sender, System.EventArgs e) {// user code is placed here to initialize Page}
#Region Web Form Designer Generated Code Override Protected Void OnNit (Eventargs E) {// // Codegen: This call is required for the ASP.NET Web Form Designer. // InitializeComponent (); base.onit (e);} /// /// Designer Supports the required method - Do not use the code editor to modify the // / this method. /// summary> private () {this.button1.click = new system.eventhandler (this.button1_click); this.load = new system.eventhandler (this.page_load);
} #Endregion
private void Button1_Click (object sender, System.EventArgs e) {// get started DataTable DataTable dt = new DataTable (); string [] aryField = { "Associate", "Fieldname", "Fileldvalue", "Operate"}; string [] Aryvale = {TextBox1.text, TextBox2.text, TextBox3.text, TextBox4.text}; for (int i = 0; i
TextBox6.text = dt.columns [0] .ColumnName; TextBox5.text = dt.rows [0] ["associate"]. Tostring ();
}}}