简体   繁体   English

如果href具有动态组件asp.net,则不会显示Facebook like按钮

[英]Facebook like button is not displaying if the href has a dynamic component asp.net

I have a asp.net page with a repeater list on it containing Facebook like buttons. 我有一个asp.net页面,上面有一个包含Facebook之类的按钮的转发器列表。 The like buttons render ok in the repeater items if the href on all the like buttons are the same in all of the items, but if I place a query string component in the href it will only show the last item in the repeater. 如果在所有项目中所有相似按钮上的href都相同,则在重复项目中,类似按钮将显示为正常,但是如果我在href中放置查询字符串组件,它将仅显示转发器中的最后一项。

eg the URL that will render the controls properly http://www.mysite.com/asppage.aspx but putting querystring component http://www.mysite.com/asppage.aspx?querystring=uniqueID where unique id is unique number in each repeater list item 例如,将正确呈现控件的URL http://www.mysite.com/asppage.aspx,但是将querystring组件放置在http://www.mysite.com/asppage.aspx?querystring=uniqueID中 ,其中唯一ID是唯一编号每个转发器列表项

I have followed all of the facebook guides but nothing fixed this issue I'm using the HTML5 version of the facebook like button 我已经遵循了所有的Facebook指南,但是没有解决此问题。我正在使用HTML5版本的Facebook Like按钮

lblFaceBookLikeButton.Text = "<div class='fb-like' data-href='http://www.mysite.com/asppage.aspx?querystring=uniqueID '  data-send='true' data-width='450' data-show-faces='true'></div>";

any ideas? 有任何想法吗?

在queryString的末尾放置&符号可解决此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM