值不能从asp.net中的Eval函数获得? [英] Values not get from Eval function in asp.net?

查看:71
本文介绍了值不能从asp.net中的Eval函数获得?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<a href="GetImage.aspx?id=<%#Eval(" ad_id=") %>" target="_blank">Apply Now</a>

推荐答案

您的属性和Eval方法使用双引号。这意味着您实际关闭了该属性,然后将 ad_id (未进行评估),然后再次打开该属性。使用单引号作为属性,使用双引号作为Eval方法:

You use double quotes for your attribute and for your Eval method. This means that you actually close the attribute, then put ad_id (which does not get evaluated), and then you open the attribute again. Use single quotes for your attribute and double quotes for the Eval method:
<a href='GetImage.aspx?id=<%#Eval("ad_id") %>' target="_blank">Apply Now</a>


这篇关于值不能从asp.net中的Eval函数获得?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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