开发者

ASP Code Inside of Quotation Marks

开发者 https://www.devze.com 2023-02-20 11:17 出处:网络
This is a very beginner question, but driving me crazy. Why isn\'t this code working? <a id=\"share_facebook\" style=\"float: left; text-align: left;\" href=\"http://www.face开发者_StackOverflow社

This is a very beginner question, but driving me crazy. Why isn't this code working?

<a id="share_facebook" style="float: left; text-align: left;" href="http://www.face开发者_StackOverflow社区book.com/sharer.php?u=<% = Request.Url %>">Test</a>

Have also tried using Response.Write() but that doesn't work either.


Silly mistake. Just needed to use ' instead of " in href=. Working code:

<a id="share_facebook" style="float: left; text-align: left;" href='http://www.facebook.com/sharer.php?u=<% = Request.Url %>'></a>
0

精彩评论

暂无评论...
验证码 换一张
取 消