FormView和具有多个QueryStrings的超链接 [英] FormView and Hyperlinks With Multiple QueryStrings

查看:60
本文介绍了FormView和具有多个QueryStrings的超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我的页面上有一个Formview,它需要一个包含多个值的超链接,例如:

viewscreen.aspx?ID = {0}& SOURCE = xxxxxx& SUBJECT = xxxxxxx

我可以使第一部分正常工作:viewscreen.aspx?ID = {0},因为{0}是绑定项的值,但是如何填充SOURCE&的其他值?主题?

SOURCE&的值SUBJECT的格式相同,并且也是绑定的标签项目...

任何帮助都将一如既往.

谢谢

皮特

PS:目前,该条目已出现在.aspx页上:

Hello

I have a formview on my page that requires a hyperlink that contains multiple values such as:

viewscreen.aspx?ID={0}&SOURCE=xxxxxx&SUBJECT=xxxxxxx

I can get the first part working: viewscreen.aspx?ID={0} as the {0} is the value of the bound item, but how can I populate the other values for SOURCE & SUBJECT?

The values for SOURCE & SUBJECT are in the same form and are also bound label items...

Any help is most appreciated as ever.

Thanks

Pete

PS: I have inlcuded the entry at the moment as it appears on the .aspx page:

<asp:HyperLink ID="COMMUNICATION_IDLabel" runat="server"

                                                NavigateUrl='<%# Eval("COMMUNICATION_ID", "viewcase.aspx?COMMUNICATION_ID={0}")%>'

                                                Text='<%# Eval("COMMUNICATION_ID") %>'></asp:HyperLink>

推荐答案

viewscreen.aspx?ID={0}"&SOURCE="+Label1.Text+"&SUBJECT="+Label2.Text;

//viewsource page load event.

string src = Request.QueryString["SOURCE"];
string sub = Request.QueryString["SUBJECT"];

//src has SOURCE(Label1.Text) value and sub has SUBJECT(Label2.Text) value.



您可以使用
Hi
You can get using
string source = Request.QueryString["SOURCE"];
string subject = Request.QueryString["SUBJECT"];  



谢谢,
Imdadhusen



Thanks,
Imdadhusen


yoy可以为此使用查询字符串
yoy can use query string for this


这篇关于FormView和具有多个QueryStrings的超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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