How can I use the DISQUS count link in my asp.net mvc 4 razor link? -


i have razor link looks this:

@html.actionlink("comment", "comment", new { id = item.newsid }) 

in disqus install info says:

place following code before site's closing tag:

<javascript> 

i have done that.

then says step 2:

append #disqus_thread href attribute in links. tell disqus links , return comment count.

for example: <a href="http://foo.com/bar.html#disqus_thread">link</a>

question

how can add #disqus_thread when i'm using htmlhelper extension?

what i've tried

@html.actionlink("comment", "comment", new { id = item.newsid + "#disqus_thread" }) 

but generates:

<a href="/home/comment/4656%23disqus_thread">comment</a> 

you need escape character this:

@html.actionlink("comment", "comment", new { id = item.newsid + "**&#35;**disqus_thread" }) 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -