Button.cmdRefresh 为gridview 的子控件按钮,
我要在这个按钮的点击事件里面获取 gridview 中的 textbox 和 checkbox 。protected void cmdRefresh_Click(object sender, EventArgs e) //"更新購物籃"
{
DataTable DT = (DataTable)Session["product_shopping_cart"];
TextBox T = new TextBox();
CheckBox C = new CheckBox();
foreach (DataRow DW in DT.Rows)
{
for (int i = 0; i < DT.Rows.Count; i++)
{
T = this.grvCart.Rows[i].FindControl("lblSubtotal") as TextBox;
if (T.Text != null)
{这个 T 控件为什么没获取到???
我要在这个按钮的点击事件里面获取 gridview 中的 textbox 和 checkbox 。protected void cmdRefresh_Click(object sender, EventArgs e) //"更新購物籃"
{
DataTable DT = (DataTable)Session["product_shopping_cart"];
TextBox T = new TextBox();
CheckBox C = new CheckBox();
foreach (DataRow DW in DT.Rows)
{
for (int i = 0; i < DT.Rows.Count; i++)
{
T = this.grvCart.Rows[i].FindControl("lblSubtotal") as TextBox;
if (T.Text != null)
{这个 T 控件为什么没获取到???
解决方案 »
- ASP.NET页面刷新方法总结(顺便散分)
- 自动请求数据
- IBatis框架中设置参数时将int类型的字段的默认值设置成0?
- 求第三方控件,给建议就给分
- 如何判断客户机是否安装某软件,如何把下载文件放在安装目录下的某个文件夹里,下载后如何判断此软件是否被打开,如果没有打开此软件则打开软件,如果软件已打开用此软件打开刚下载的文件。
- Fileupload中怎么没有textchanged事件。
- wp7探讨 谁会做类型与qq退出的效果如图求高人
- 网站发布之后网页只在左上角显示一个 0 !!!
- 用过HtmlEditor的大哥大姐们求你们进来一下,好吗?
- asp:HyperLinkColumn 的问题!
- 递归
- silentwins wuyq11 补分
{
if(DT.Rows[i].RowType == DataControlRowType.DataRow)
{
T = this.grvCart.Rows[i].FindControl("lblSubtotal") as TextBox;
if (T.Text != null)
{
{
T = gr.FindControl("lblSubtotal") as TextBox;
}
{
int Index = ((GridViewRow)((Button)sender).NamingContainer).ItemIndex;
TextBox T = this.grvCart.Rows[Index].FindControl("lblSubtotal") as TextBox;