private
void
Page_Load(
object
sender, System.EventArgs e)
{
Button bt = new Button();
bt.Text = "new button";
bt.Click += new System.EventHandler(Button1_Click);
bt.CommandName = "ddddd";
bt.CommandArgument = "CommandArguments";
}
private void Button1_Click( object sender, System.EventArgs e)
{
string cdm = ((Button)(sender)).CommandArgument.ToLower();
string nowvalue = "";
string strcmdName = this.Button1.CommandName;
foreach(DataGridItem item in RecssDataGrid1.Items)
{
foreach(Control control in item.Cells[1].Controls)
{
if(control.GetType().ToString()=="System.Web.UI.WebControls.TextBox")
{
TextBox lb = (TextBox)control;
nowvalue = lb.Text;
}
}
}
}
Button bt = new Button();
bt.Text = "new button";
bt.Click += new System.EventHandler(Button1_Click);
bt.CommandName = "ddddd";
bt.CommandArgument = "CommandArguments";
}
private void Button1_Click( object sender, System.EventArgs e)
{
string cdm = ((Button)(sender)).CommandArgument.ToLower();
string nowvalue = "";
string strcmdName = this.Button1.CommandName;
foreach(DataGridItem item in RecssDataGrid1.Items)
{
foreach(Control control in item.Cells[1].Controls)
{
if(control.GetType().ToString()=="System.Web.UI.WebControls.TextBox")
{
TextBox lb = (TextBox)control;
nowvalue = lb.Text;
}
}
}
}