在request.querystring中传递多个值 [英] passing multiple values in request.querystring
本文介绍了在request.querystring中传递多个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用过asp:imagebutton
,我想将多个QueryString值传递给其他页面.我能够传递1个值,但不知道如何处理多个值.这是我对单一值的处理方式.
I have used asp:imagebutton
and i want to pass multiple QueryString value to other page. I am able to pass 1 value but don''t know how to do with multiple value. Here is how I did with single value.
<asp:ImageButton id="ImageButton1" runat ="server" ImageUrl ='<%# eval("IMAGEPATH") %>' PostBackUrl='<%# Eval("ProductID", "ViexProductFullDesc.aspx?ProductID={0}") %>' />
谁能告诉我如何修改代码以传递多个值?
我也试过了:
Can anybody tell how can I modify the code to pass multiple values?
I tried this also :
<asp:ImageButton id="ImageButton1" runat ="server" ImageUrl ='<%# eval("IMAGEPATH") %>' PostBackUrl='<%# string.format(Eval("ProductID"),EVAL("PRODUCTCODE"), "ViexProductFullDesc.aspx?ProductID={0}&code={1}")) %>' />
但不起作用.
任何帮助....
But not working.
Any help....
推荐答案
正确使用string.format
use string.format properly
String.Format("ViexProductFullDesc.aspx?ProductID={0}&code={1}",
Eval("ProductID"),
Eval("PRODUCTCODE"))
它不应该更像是:
Shouldn''t it be more like :
PostBackUrl=''<%# string.format( "ViexProductFullDesc.aspx?ProductID={0}&code={1}",Eval("ProductID"),Eval("PRODUCTCODE"))) %>''
?
干杯
?
Cheers
如何在多个页面中传递相同的查询字符串?
提前谢谢...
hi how to pass same query string in multiple pages???
thnks in advance...
这篇关于在request.querystring中传递多个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文