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

推荐订阅源

G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
C
Check Point Blog
B
Blog RSS Feed
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
人人都是产品经理
人人都是产品经理
小众软件
小众软件
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
GbyAI
GbyAI
The Cloudflare Blog
博客园 - 叶小钗
S
SegmentFault 最新的问题
博客园 - Franky
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
B
Blog
Jina AI
Jina AI

博客园 - 御不凡

中国国内ip大全 win10找回自带的windows照片查看器——打开jpg、png、gif、psd其他格式的图片 ping 命令回显带时间 DellR410配置Raid1并安装Esxi6.5 WinServer2016破解密码后,服务中ASP.net State service没了 excel批量去单引号,批量改文本格式,批量加坐上角标 win10共享打印机服务机以及客户机设置方法 sqlserver不同服务器数据库联合查询 word设置标题多级编号 VS2019,无法启动程序xxx.exe,系统找不到指定的文件,重新生成解决方案报错 .net Core Web API VS2017从安装到部署,用c#开发的webservice在Linux里使用 windows任务计划不执行的解决方法 ASP.NET点击按钮回车提交web页面回车提交点击回车按钮提交 mySQL将表结构转化成表格格式并插入到word文档中,表结构转化为数据库设计说明书 解决页面favicon.ico文件不存在提示404问题 禁止button响应回车(.net页面) SQLserver导入csv文件 VS2010 c#创建及调用Webservice SQL Server Always on 日志收缩
GridView中DropDownList传参
御不凡 · 2023-03-14 · via 博客园 - 御不凡

<asp:TemplateField HeaderText="是否空闲">
<ItemTemplate>
&nbsp;
<asp:HiddenField ID="hidKongXian" Value='<%#Eval("是否空闲")%>' runat="server" />
<asp:DropDownList ID="ddlKongXian" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlKongXian_SelectedIndexChanged">
<asp:ListItem Text="--选择--" Value="-1"></asp:ListItem>
<asp:ListItem Text="在用" Value="在用"></asp:ListItem>
<asp:ListItem Text="空闲" Value="空闲"></asp:ListItem>
<asp:ListItem Text="不确定" Value="不确定"></asp:ListItem>
</asp:DropDownList>
&nbsp;
</ItemTemplate>
<ItemStyle Width="300px" />
</asp:TemplateField>

//是否空闲
protected void ddlKongXian_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList ddlKongXian = sender as DropDownList;
TableCell cell = (TableCell)ddlKongXian.Parent;
GridViewRow item = (GridViewRow)cell.Parent;
string id = item.Cells[1].Text;
string kongXian = ddlKongXian.SelectedValue;
string sqlStr = "update myTable set 是否空闲='" + kongXian + "' where id=" + id;
sqlHelp.inUpDelInfo(sqlStr);
this.BindData();
}