惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
U
Unit 42
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
H
Help Net Security
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
博客园 - 聂微东
S
Securelist
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
Cisco Talos Blog
Cisco Talos Blog

博客园 - 周奇

程序员大杯具:蜗居中的小贝是搞C++的 APS.NET获取用户端真实IP - 周奇 - 博客园 Repeater 实现批量,删除.全选.分页 - 周奇 - 博客园 Repeater 实现删除 - 周奇 - 博客园 Google和百度收录网站页面的比较 Js做的动态Flash - 周奇 - 博客园 设为首页代码大全 - 周奇 - 博客园 asp.net不刷新显示隐藏的办法(心得) - 周奇 - 博客园 统计网页访问量的JAVA Script代码 - 周奇 - 博客园 解决IE6、IE7、Firefox兼容最简单的CSS Hack 过滤html(转) - 周奇 - 博客园 联合查询 sql语句的联合查询(join 用法) 功能超多的JS验证表单大全 Repeater 删除 记录 功能 实现 链接数据库超时 向google,baidu,yahoo,msn,sogou等搜索引擎提交网站 娶个女程序员的好处 最简单的mp3播放器,只有播放和暂停
获取Repeater中TextBox中的值 - 周奇 - 博客园
周奇 · 2009-08-31 · via 博客园 - 周奇

aspx页面

<asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
                                        <ItemTemplate>
<asp:LinkButton ID="LinkButton2" runat="server" CommandName="updatename" OnClientClick="return confirm('确定要保存此修改吗?');"  CommandArgument='<%# Eval("XiangceId") %>'>改名</asp:LinkButton>

  <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Delete" CommandArgument='<%# Eval("XiangceId") %>' OnClientClick="return confirm( '你确定要删除这条记录? '); ">删除</asp:LinkButton>
 </ItemTemplate>
                                    </asp:Repeater>
cs页面
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {

int id3 = Convert.ToInt32(e.CommandArgument);
        if (e.CommandName == "updatename")
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                TextBox textBox = (TextBox)e.Item.FindControl("tbName");
                //下面是自己的方法

                string strName = textBox.Text;
                string struid = uid.ToString();

                string strsql3 = "update Xiangce set Name='" + strName + "'  where XiangceId=" + id3;
                Response.Write(strsql3);
                int intNum = DAL.SqlServer2000.RunSql(strsql3);
                if (intNum != 0)
                {
                    ClassMessage.ShowAndRedirect(this.Page, "恭喜您,名称修改成功,!", "T_Pic_Sort.aspx");
                }
                else
                {
                    ClassMessage.Alert(this.Page, "对不起,名称修改失败!");
                }
            }           
        }

}