[已解决]如何将查询字符串值传递给另一个页面? [英] [Solved] How do I pass query string value to another page ?

查看:73
本文介绍了[已解决]如何将查询字符串值传递给另一个页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用查询字符串将值传递给另一个页面,但没有获取querystring的值。下面的代码包含查询字符串。

Am trying to pass value to another page using the querystring but not getting value of querystring. below code contains the querystring .

<ItemTemplate>
                                               <asp:HyperLink ID="Hyplapprover" runat="server" NavigateUrl='<%# Eval("mbo_req_id", "MBO_Approver_Edit.aspx?mbo_req_id={0}") %>'  >View</asp:HyperLink>
                                           </ItemTemplate>





错误是什么?



What will the error?

推荐答案

使用下面的代码: -



string id =abbb;

回复.Redirect(Yourpage.aspx?abc= + id);





使用abc的值如下:



string xyz = request.querystring [abc]。tostring();
use below code:-

string id="abbb";
Response.Redirect("Yourpage.aspx?abc"= +id);


use the value of abc as below:

string xyz= request.querystring["abc"].tostring();


参见示例.....


QUER y-string-in-aspnet-example-c-vbnet.html [ ^ ]
See Example.....

query-string-in-aspnet-example-c-vbnet.html[^]


试试这个:

try this :
<itemtemplate>
 <asp:hyperlink runat="server" id="MyLink" text="<%# Eval(" field=") %>" navigateurl="MBO_Approver_Edit.aspx.aspx?mbo_req_id=<%# Eval("DatasourceField") %>" xmlns:asp="#unknown"></asp:hyperlink>
</itemtemplate>


这篇关于[已解决]如何将查询字符串值传递给另一个页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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