post back url + eval()函数 [英] post back url + eval() function

查看:90
本文介绍了post back url + eval()函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨小伙伴们



i希望将我的页面重定向到另一个页面并使用PostBackURL发送查询字符串,但它不起作用plz help :)



< asp:ImageButton ID =   ImageButton2 PostBackUrl = '  Mng.aspx?fileOutIdBook =<%#Eval(fileOuId) %>>& module = DeletFile' runat =   server /> ; 





i在我的地址栏中得到类似下面的内容 - >





http:// localhost:9965 / liberary / Mng / Mng.aspx?fileOutIdBook =%3C%#Eval%28%22fileOuId%22%29%20 %% 3E%3E& amp ; module = DeletFile



i预计会看到这个





http: //localhost:9965/liberary/Mng/Mng.aspx?fileOutIdBook=201&module=DeletFile



201由Eval()

解决方案

尝试使用



 PostBackUrl ='< ;%字符串 .Format(  〜/ Mng.aspx?fileOutIdBook = {0}& module = DeletFile,Eval(  fileOuId ))%>'


请试试这个....



PostBackUrl ='Mng.aspx?fileOutIdBook ='<%# Eval(fileOuId)%>'&module = DeletFile'


似乎您遇到语法错误。所有内联表达式必须在打开和实际内容之间有一个whitesapce:

 <   asp:imagebutton     id   =  ImageButton2    postbackurl   =  Mng.aspx?fileOutIdBook = <%#[此处必须有空格] Eval(  fileOuId)%>>& ; module = DeletFile    runat   =   server    xmlns:asp   = #unknown    /  >  



对于某些参考阅读:http://support.microsoft.com/kb/976112 [ ^ ]


hi guys

i want to redirect my page to another page and send query string with PostBackURL but it doesn't work plz help :)

<asp:ImageButton ID="ImageButton2" PostBackUrl='Mng.aspx?fileOutIdBook=<%#Eval("fileOuId") %>>&module=DeletFile' runat="server"/>



i get something like below in my address bar ->


http://localhost:9965/liberary/Mng/Mng.aspx?fileOutIdBook=%3C%#Eval%28%22fileOuId%22%29%20%%3E%3E&module=DeletFile

i expected to see this


http://localhost:9965/liberary/Mng/Mng.aspx?fileOutIdBook=201&module=DeletFile

201 bounded by Eval()

解决方案

try with

PostBackUrl='<%# String.Format("~/Mng.aspx?fileOutIdBook={0}&module=DeletFile", Eval("fileOuId")) %>'


pls try this one....

PostBackUrl='Mng.aspx?fileOutIdBook='<%#Eval("fileOuId") %>'&module=DeletFile'


It seems you got a syntax error. All inline expressions must have a whitesapce between opening and the actual content:

<asp:imagebutton id="ImageButton2" postbackurl="Mng.aspx?fileOutIdBook=<%#[here must have a whitespace]Eval("fileOuId") %>>&module=DeletFile" runat="server" xmlns:asp="#unknown" />


For some reference reading: http://support.microsoft.com/kb/976112[^]


这篇关于post back url + eval()函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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