如何使用hyperLinkFiel将值从label传递到查询字符串 [英] How do you pass a value from label to a querystring using hyperLinkFiel

查看:84
本文介绍了如何使用hyperLinkFiel将值从label传递到查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用Gridview中的HyperLinkField将标签值传递给查询字符串?我有以下代码,需要将lblTotal上显示的值传递给另一个页面,希望使用HyperLinkField。我搜索了Google,但找不到一个例子



Is it possible to pass a label value to a querystring using the HyperLinkField within a Gridview? I have the following code and need to pass the value displayed on the lblTotal to another page, was hoping to use the HyperLinkField. I have searched Google, but can't find an example

<asp:TemplateField HeaderText="Total Amount">
 <ItemTemplate>
 </asp:Label>
 <asp:Label ID="lblTotal" runat="server" Text="0.00" Width="20px" ></asp:Label>
 </ItemTemplate>

推荐答案

是的,只是在超链接字段的href中连接你的标签值datarowbound事件或可以通过项模板中的binder表达式。
yeah just concatenate your label value in href of hyperlink field either in datarowbound event or may be by binder expression in item template.


这篇关于如何使用hyperLinkFiel将值从label传递到查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆