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

推荐订阅源

博客园_首页
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
D
Docker
云风的 BLOG
云风的 BLOG
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
GbyAI
GbyAI
T
Tailwind CSS Blog
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
C
Check Point Blog
I
InfoQ
Microsoft Azure Blog
Microsoft Azure Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
N
Netflix TechBlog - Medium
B
Blog RSS Feed
腾讯CDC
aimingoo的专栏
aimingoo的专栏

博客园 - 张明

搭建windows mobile 6 中文开发环境和中文测试环境 asp.net2.0为DataList和GridView内容项添加序号 [原创]完美Js(Javascript)代码自动成器 金额转换,把金额转换成为汉字大写金额! 使用存储过程并返回值与及返回值的获得方法 AjaxControlToolkit的安装与使用详解 更新公告,本Blog从即日起开始更新,基本保证每天一更,欢迎广大开发者提出宝贵意见 Asp.Net2.0下C#环境 Login控件实现用户登录 IFRAME滚动条的样式 asp.net下Split分隔字符串的应用 - 张明 - 博客园 [原创]Asp.net2.0下(数据库主表,子表)实现TreeView控件的树型目录。 [原创]Asp.net2.0下利用Global.asax全局文件实现流量分析 [原创]Asp.net2.0 VS 2005下的repeater控件本功能分页实例(共有 条记录 共有几页 当前第 页 首页,上一页,下一页,尾页 DropDownList跳转) File文件控件,选中文件(图片,flash,视频)即立即预览显示 ADO.NET 的最全实例,Ado.Net最佳使用方法 ADO.NET 的最佳实践技巧 ASP.NET结合存储过程写的通用搜索分页程序 GridView记录删除前的确认窗口 MsSqlServer常用数据类型 常用正则表达式
asp.net2.0 GridView Url传递中文参数解决方案
张明 · 2006-10-06 · via 博客园 - 张明

Posted on 2006-10-06 05:05  张明  阅读(1938)  评论(2)    收藏  举报

 <asp:GridView ID="GridView1" PageSize="30" runat="server" Height="100%" Width="100%" AutoGenerateColumns="False" AllowPaging="True" EmptyDataText="没有数据记录!!" DataKeyNames="iProductBigSort_ID" BackColor="#EEEEE6" OnRowEditing="GridView1_RowEditing" onRowCancelingEdit="GridView1_RowCancelingEdit" onRowDeleting="GridView1_RowDeleting" onRowUpdating="GridView1_RowUpdating" >
            
<Columns> 
                
<asp:TemplateField HeaderText="主分类名">
                    
<ItemTemplate><%# Eval("sProductBigSort")%></ItemTemplate>
                    
<EditItemTemplate><asp:TextBox ID="sProductBigSort" Width="60%" runat="server" Text= <%# Eval("sProductBigSort")%> /></EditItemTemplate>
                
</asp:TemplateField>
                
<asp:TemplateField HeaderText="管理子分类">
                    
<ItemTemplate>
                    
<a href="Admin_SmallSort.aspx?iProductBigSort_ID=<%# Eval("iProductBigSort_ID")%>&sProductBigSort=<%# Server.UrlEncode(Eval("sProductBigSort").ToString())%>">查看分类</a>
                     
</ItemTemplate>
                
</asp:TemplateField>
                
<asp:CommandField ShowEditButton="True" HeaderText="操作" ButtonType="Button"/>                
                 
<asp:TemplateField HeaderText="删除分类" ShowHeader="False">
                    
<ItemTemplate>
                        
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" Text="删除" OnClientClick="return confirm('严重警告!!此操作非常危险!!\n此操作将会删除以下信息:\n此主分类下的二级、三级小分类、相关品牌以及删除相关的全部产品资料。\n确认要删除吗?');"></asp:LinkButton>
                    
</ItemTemplate>
                
</asp:TemplateField>
             
</Columns>
            
<PagerSettings Visible="False" />
        
</asp:GridView>


//这就实现了GridView的模板列传递URL参数时进行了编码
/*
a href="Admin_SmallSort.aspx?iProductBigSort_ID=<%# Eval("iProductBigSort_ID")%>&sProductBigSort=<%# Server.UrlEncode(Eval("sProductBigSort").ToString())%>">查看分类</a>
*/



刷新页面返回顶部