All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
一个典型的PHP分页实例代码_[PHP教程]
C#中删除XML节点实例
ASP.NET构架与安全机制之Http请求处理_.net资料_编程技术
在ASP.NET中如何防范SQL注入式攻击_[Asp.Net教程]
总结经验技巧文章:C#.NET函数和方法集_.net资料_编程技术
九 表格 Tables_[Html教程]
在系统中生成Excel流并传给用户_[Asp.Net教程]
LINQ体验(17)——LINQ,to,SQL语句之动态查询_[Asp.Net教程]
给初学者(web开发)的建议_.net资料_编程技术
技巧:在ASP.NET,2.0中建立站点导航层次_.net资料_编程技术
Reading number is top 10 pictures
漂亮的跳舞妹妹2
NeedWallpaper6
移民小国也实惠2
The terra-cotta warriors1
美女浴室写真3
遇到插队的怎么办?
The world first motorcycle will be auctioned for 21000 pounds
青春清纯美女大集合1
Ashlynn Brooke a group sexy photo4
Breasts woman big set 1
Download software ranking
天龙八部最新服务端
Visual C++界面编程技术
Boxer's Top ten classic battle5
传奇私服架设教程
Unix video tutorial11
徐若瑄成名作“魔鬼天使”
网络管理员第三版
1400篇各类破解文章
Ashlynn Video1
I'm come from Beijing2
归海一刀 published in(发表于) 2014/1/30 1:21:34 Edit(编辑)
asp.net得到GridView中自定义控件的值_[Asp.Net教程]

asp.net得到GridView中自定义控件的值_[Asp.Net教程]

asp.net得到GridView中自定义控件的值_[Asp.Net教程]
如何获得MAmount的值


’ />


问题补充:要将GridView中的数据批量修改,用FindControl获得’ />的值
cmd.CommandType = CommandType.Text;
cmd.CommandText = "update yf_Purchases set Main=@Main, MAmount=@MAmount,MOverDate=@MOverDate,MMPrice=@MMPrice where OrderID=@OrderID";
cmd.Parameters.Add("@OrderId", SqlDbType.NVarChar, 20);
cmd.Parameters.Add("@Main", SqlDbType.NVarChar, 10);
cmd.Parameters.Add("@MAmount", SqlDbType.Int);
cmd.Parameters.Add("@MOverDate", SqlDbType.VarChar,50);
cmd.Parameters.Add("@MMPrice", SqlDbType.Int);
cmd.Parameters["@OrderId"].Value = ((HiddenField)gvr.FindControl("OrderID")).Value;
cmd.Parameters["@Main"].Value = ((TextBox)gvr.FindControl("Main")).Text;
cmd.Parameters["@MAmount"].Value =?
答:
例子:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.Cells[12].Text.ToString() == "提交待审核" || e.Row.Cells[12].Text.ToString() == "审核通过")
{
Label lbl_edit = e.Row.FindControl("Label1_edit") as Label;
Label lbl_editr = e.Row.FindControl("Label1_editr") as Label;
lbl_edit.Visible = false;
lbl_editr.Text = " ";
lbl_editr.Visible = true;
}
}
catch { }
}


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.