.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Is it possible to localize a URL / routing in ASP.NET MVC?

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net

I'm working with a client that wants the URLs in our web application to be in French. I'm an English developer and we also have English clients. This is an interesting problem is there something int the ASP.NET MVC Framework that would enable me to do this?

Here's the scenario. The route...

Specific EXAMPLE
English URL

View Complete Post

More Related Resource Links

Routing for Web Forms in ASP.NET 4.0

posted a prototype demonstrating how one could use Routing within Web Forms. This is something you can do today with ASP.NET 3.5 SP1, because of the work we did to separate Routing from ASP.NET MVC. I would have liked to include Web Form Routing as part of the Routing feature when we were working on SP1, but we didn't have the time to do so in a robust manner before SP1 was locked down.

What's new in ASP.NET 4.0 - Part II - Routing in Webforms

This post covers one such feature which is Routing in Webforms. Although Routing was available even in .NET 3.5 SP1, (check this excellent post by Phil Haack on implementing Routing in ASP.NET 3.5 with .NET 3.5 SP1), it was kind of less known. Also the plumbing work was too much for getting it implemented.

ASP.NET 4.0: WebForm Routing (quick n dirty version)

One of the things we're adding in ASP.NET 4.0 is built-in support for using Routing together with WebForms. Now, I'm totally aware that this is possible to do already and that a number of people have posted ways of doing this with the Web Routing feature which shipped with ASP.NET 3.5 SP1. We're just adding some features to make it easier to do

How to Localize Windows Forms and Change the Language at Runtime

Localization is the process of customizing your application to a particular language, culture or locale. Visual Studio provides support for localizing Windows Forms with much ease. In this article, we will see how to localize windows forms and give the user the ability to change to his preferred language at runtime.
When you run a localized application, the appearance is determined by two culture values. The UICulture property is used to specify which resource files will be loaded for the form. The Culture property, on the other hand, determines how strings such as dates, numerals, and currency amounts are formatted.
Let us see the steps required to create a localized form. You can then expand this example and adopt the same approach for the rest of the forms in your project

Problem upgrading to MVC3 - System.Web.Routing



I'm trying to upgrade to .NET 4 and MVC 3.

When trying to compile my project, I get the error:

Error 1 The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) C:\Users\spencer\Desktop\weblauncher\Common\MVCConfig.cs 4 18 Common

The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

I do have the System.Web.Routing in my references for the project.

BUT - when I try to view System.Web.Routing in the OBJECT BROWSER, nothing is inside!  The System.Web.Routing namespace is not in there - the entire thing is empty!  Could it that the dll is corrupted?  I tried to reinstall the .NET 4 and MVC 3 stuff, but its still empty!

The dll is coming from here:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Routing.dll

and the runti

Routing in dynamic data applications


Im using ASP.Net 4. I tried to modified the code according to following video tutorial. http://www.asp.net/aspnet-in-net-35-sp1/videos/how-to-enable-table-specific-routing-in-dynamic-data-applications

But Product page directs only to ListDetails.aspx page.

This is my code :

<%@ Application Language="C#" %>
<%@ Import Namespace="System.ComponentModel.DataAnnotations" %>
<%@ Import Namespace="System.Web.Routing" %>
<%@ Import Namespace="System.Web.DynamicData" %>

<script RunAt="server">
    private static MetaModel s_defaultModel = new MetaModel();
    public static MetaModel DefaultModel {
        get {
            return s_defaultModel;

    public static void RegisterRoutes(RouteCollection routes) {

        DefaultModel.RegisterContext(typeof(NorthwindDataContext), new ContextConfiguration() { ScaffoldAllTables = true });


URL Routing and Existing HttpHandler problems


Hello everyone,

I have a problem:

I am currently using 2 features: 

1. HttpHandler

Registering the path="res.aspx" verb="*"

2. URL Routing:

Registering with this pattern: "Company/Edit/{*companyId}","~/CompanyEdit.aspx"

In my CompanyEdit.aspx page, I used httphandler res.aspx to generate some images at client.

  • res.aspx?img=1
  • res.aspx?img=3

Now the problem is here, the page is load success with companyId = "12345", but when the images was loaded at client, it loaded the CompanyEdit.aspx again and show error with wrong id.  

I have debug and find the problem that because when image's urls were generated to client with url=res.aspx?img=1, url=res.aspx?img=3, the asp.net will understand that they are Company/Edit/res.aspx?img=1, Company/Edit/res.aspx?img=3 when it maps with URL Routing pattern.

=> So the CompanyEdit.aspx was load again with wrong id (id now is "res.aspx"). 

So, do you have any ideas to solve this problem, or other design.

Thanks, and best regard

Localize framework message from xml validation error


I need to validate an XML through XSD. I am using XMLReader (with XmlReaderSettings and 

Validation_EventHandler to do it). Depend on users preference, I would like to change the output message generated by  Validation_EventHandler in french or english.

Any idea on how to perform this?





Extreme ASP.NET: Routing with ASP.NET Web Forms


See how to get the benefits of rerouting while alleviating the risks with this in-depth look at URL rewriting in ASP.NET.

Scott Allen

MSDN Magazine January 2009

routing fails



I am trying to compile and run an asp.net application and am getting the following errors

 HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

I have a starting URL of http://localhost:61431/WebSuds/Suds/Welcome and routing code

"Default",                                 // Route name
"{controller}/{action}/{page}",            // URL with parameters
new { controller = "Suds", action = "Welcome",

Strange URL Routing Problem, participially working


I am setting up URL Routing on my existing project. I am not using mvc.

The routing only working like this: http://www.example.com/sdevil.m

not working with single word like this: http://www.example.com/sdevil

I am getting error message:The resource cannot be found.

Looks like when I using single word, application think that is folder?

How can i fix this? Thank you for any helps.

Video: SharePoint 2010: Advanced Routing and Document Sets

Learn how to work with document sets such as RPFs (Request for Proposal), which may be made up of multiple documents such as the question document, the answer document, and many other supporting documents and files. (Length: 13:56)

Problem with default routing

Hi, I am Ashish. I have developed an ASP.NET web application using MVC 1.0. I have taken a view named TaskUI and Controller TMController. I have chosen my UI page is as default page, and accordingly I changed Default Rout as given bellow: routes.MapRoute( "TaskUI",// Route name "{controller}/{action}/{id}"// URL with parameters new{ controller = "TM", action = "CreateTask", id = "" } // Parameter defaults); It is working great... My UI page contains a textbox which is tagged with a javascript onChange function <%=Html.TextBox("TaskId", ViewData.Model.Task.TaskId, new { size = 10, onChange = "GetTaskInfo1()", onkeypress = "InputOnlyNumber(event)" })%> When I input a value on the textbox and press the tab the javascript function is called which isfunction GetTaskInfo1() { var vCalleeVar1 = document.getElementById('TaskId').value; if (vCalleeVar1 != undefined && vCalleeVar1 != null) { location.reload("GetTaskInfo?pTaskId=" + vCalleeVar1); return true; } else return false; } Now the problem is the URL that gets LocalHost.../GetTaskInfo?pTaskId=123, whether it should be LocalHost.../TM/GetTaskInfo?pTaskId=123, because the action "GetTaskI

Routing pox, json & soap

I have a service exposed as pox, json & soap, as described at http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html. It exposes the endpoints: - http://localhost:81/TestService/soap - http://localhost:81/TestService/pox - http://localhost:81/TestService/json I now want to have a router, and to verify functionality, just expose it at http://localhost:82/... and have it forward calls to http://localhost:81/... I get this to work fine with the pox endpoint by following the initial steps at http://msdn.microsoft.com/en-us/magazine/cc500646.aspx, but I can't get it to work with soap or json. How should this be set up to have one router handle calls to all three enpoints? Hälsningar Anders

How to localize a .webpart file?

Hi I just got handed a project from another developer and now I need to localize a set of existing .webpart files. My idea was something like : <?xml version="1.0" encoding="utf-8"?> <webParts>     <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">         <data>             <properties>                 <property name="Title" type="string">$Resources:TestWPRes,WPDefTitle</property>                 <property name="Description" type="string"></property>              </properties>         </data>     </webPart> </webParts>   However, Having the resource file in 12\Resources does exactly nada. Not even an error message. When displaying the "$Resources:TestWPRes,WPDefTitle" . Now where did I go wrong and how do I fix it?

WCF Routing Service BindingConfiguration does not applied

Hi i am having issues working with the routing service All works fine Until one of the functions of the web service returned big amounts of data from the server, The status: I am having: 1. Silverlight application (client) 2. UI server (Contains the routing service) 3. Application Server (Contains the WCF Service which getting data from the database) The silverlight application is currently hosted both on the UI server and Application server. The services of the application server configured with the following: <basicHttpBinding> <binding name="BigServicesBinding" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" receiveTimeout="00:02:00" > <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxStringContentLength="2147483647" maxNameTableCharCount="2147483647" maxDepth="2147483647" </binding> </basicHttpBinding> I have also set the routing service bindingConfiguration to this binding configuration. When running the silverlight application against the Application server - it works well When running the silverlight application against the UI Server when returnning big amount of data i am getting exception: System.ServiceModel.CommunicationException: The remote server returned an

MVC Routing and WebForm Routing in same Project

We have developed Web Application with WebForm in ASP.Net 3.5 and C#.  Later we migrated this Application to ASP.Net 4.0. We have already used Routing Feature for WebForm Application. The extension to this application also needs to run on different SMART Phones. To support that we have developed Application in the MVC. Means, we have single Web Application with WEBForm + MVC and both will run side by side.   Now, we are facing issue that How to configure Routing (as, we need Routing to be used WebForm as well as MVC).   How to manage this?   Thanks      
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend