Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8321583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:04:11+00:00 2026-06-08T23:04:11+00:00

I have this code in a JavaScript function: var url = ‘@Url.Action(MVC.Membership.User.ActionNames.Update, MVC.Membership.User.Name)’; url

  • 0

I have this code in a JavaScript function:

var url = '@Url.Action(MVC.Membership.User.ActionNames.Update, MVC.Membership.User.Name)';

url += "?userName=" + userName;

ul.append("<li><a href=" + url + "\>" + userName + "</a></li>");

Membership is an Area. I’m using T4MVC to refer to Controller and Action names to avoid magic strings… 🙂

This JavaScript code is part of View that resides in the Membership Area.

UserController is decorated this way:

[RouteArea("Membership")]
public partial class UserController : BaseController

and the Action method is this one:

[GET("Users/Update/{userName}")]
public virtual ActionResult Update(string userName)

The route I get in the link is this:

http://localhost:8087/membership/User/Update?userName=leniel

I expected it to be:

http://localhost:8087/membership/users/update?userName=leniel

So my question is: why the link is not in lowercase since all other links in the app are being generated with lower case letters? Is this not supported or am I forgetting some config related to AttributeRouting or the Area setup?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:04:12+00:00Added an answer on June 8, 2026 at 11:04 pm

    After the feedback from AttributeRouting creator… turns out it was my bad.

    Now I understand the problem…

    If I do this:

    var url = '@Url.Action(MVC.Membership.Permission.ActionNames.GrantRevoke, MVC.Membership.Permission.Name, new { area = "Membership", roleName= "Teste" }, null)';
    

    The URL is generated correctly:

    var url = '/membership/permissions/grantrevoke/teste';
    

    but if I do this:

    var url = '@Url.Action(MVC.Membership.Permission.ActionNames.GrantRevoke, MVC.Membership.Permission.Name, new { area = "Membership" }, null)';
    

    I get this:

    var url = '/Membership/Permission/GrantRevoke';
    

    It’s clear that I need to pass the roleName parameter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: <script type=text/javascript> $(document).ready(function() { var url = https://graph.facebook.com/search?q=cinema&type=post; $.ajax({ type:
i have this code: <script type=text/javascript> $(document).ready(function() { function doAjax(url) { $(#customForm).submit(function() { var
I have this javascript code <Script> function getGroupId(){ var group=document.getElementById(selectedOptions).value; var groupFirstLetter=group.substring(2); } </Script>
Okay, I have this code: <script language=javascript type=text/javascript> <!-- function requestPage(page) { var request
I have this code: <script type=text/javascript> var maxLength=10; function charLimit(el) { if (el.value.length >
I have this code: <script type=text/javascript> var loader = #loader; $(function() { $(#selUsers).change(function() {
I have this code: <script type=text/javascript> $(document).ready(function(){ var id = 'i1'; var image =
I have this code: <script type=text/javascript> var url = http://www.xxxxx.xxx/xxxxxxxxx; var txt; var id1;
I have this javascript code : function showMyVideos(data) { var feed = data.feed; var
I have this jQuery code: <script type=text/javascript > $(function() { $('#add_comment').bind('submit',function() //$(input[type=submit]).click(function() { var

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.