Html.ActionLink does not work correctly

When I try to render an actionlink in razor, it comes out oddly.

For instance, when I do the following:

@Html.ActionLink("Edit", "Edit", "Sites", new {itm.Id}, null)

On screen, the link I get looks like:

Edit (/Sites/Edit/1)

In the HTML, it only looks like this:


This is like a bad dream. I can’t figure out where this crap is coming from. It also does it in Firefox (I normally use Chrome). Interestingly enough, you can’t select the text that is showing up. I’ve never seen this issue before and that text isn’t even in the page, except as the url path.

Ok, this was nice and daft of me. I’m using BluePrint.css on these pages. For some reason, the print version of the blueprint stylesheet was getting output to the page. This prints the hyperlink out by the text like so: a:link:after, a:visited:after {content:” (” attr(href) “)”;font-size:90%;}

I didn’t even know you could do this with css. Thanks to everyone for the help.

Hello, buddy!稿源:Hello, buddy! (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 前端开发 » Html.ActionLink does not work correctly

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录