开发者

sending active href in view data asp.net MVC 3 @View. method

i am using asp.net MVC and have been using mvc for quite a while now but i have something along the lines of this:

@View.greeting | <a href="/Login/Logout">LOGOUT</a>

i have to but in the logout link as if i try to pass it over the @View will html encode and show the html of the link, i would prefer to deliver a result of login or logout depending on there current status.

I know this should be 开发者_如何学Gosimple but sometimes it is these little things that just seem to blank you out.

would appreciate a simple solution around the whole html encoding

thanks

p.s can someone create the tag for asp.net MVC 3 !!


I think you're looking for this

@(new HtmlString(View.greeting))
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜