本文介绍了将变量插入查询字符串<%#= address%>。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想插入<%#= address%>。你如何在ASP.net中做到这一点我知道如何在PHP中做到这一点:
I want to insert in <%#=address%>. How do you do this in ASP.net I know how to do it in php:
<img src="http://maps.googleapis.com/maps/api/staticmap?center=<%#=address%>&zoom=13&size=600x600&maptype=roadmap&sensor=true" alt="Home" />
推荐答案
Response.Redirect("YourPage.aspx?id=" + yourId.toString(), true);
2。将按钮渲染为LinkButton并设置URL:
2. Render the button as a LinkButton and set the URL :
LinkButton myLinkButton = new LinkButton("YourPage.aspx?id=" + yourId.toString(), true);
3。将按钮渲染为客户端链接(使用Repeater控件)
3. Render the button as a client side link (with Repeater control)
<a href='YourPage.aspx?id=<%# Eval("yourID") %>'>Link</a>
这篇关于将变量插入查询字符串<%#= address%>。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!