asp.net mvc - ActionLink for Logout is rendering wrong route -


i'm trying figure out why actionlink renders wrong. in _layout.cshtml have

<div class="col-sm-7">     <ul>         <li class="section-head section-head2 ">xyz technologies</li>         <li>@viewbag.email</li>     </ul> </div> <div class="col-sm-5">     @html.actionlink("logout", "logout", "submission", new {@class = "pull-right"}) </div> 

but when i'm in view on 'customforms' controller renders this:

<div class="col-sm-7">     <ul>         <li class="section-head section-head2 ">xyz technologies</li>         <li>someone@noserver.com</li> </div> <div class="col-sm-5">     <a class="pull-right" href="/customforms/logout?length=10">logout</a> </div> 

i guess there's overwriting it, i'm not sure how track down what. ideas?

the length=10 comes attempt serialize string object related "submission" has 10 characters. can change to

@html.actionlink("logout", "logout", new { controller = "submission" }, new {@class = "pull-right"}) 

in fact, "actionlink" takes "routevalues" parameter.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

php - How do you embed a video into a custom theme on WordPress? -