asp.net mvc 3 - Ugly url in mvc3-how make it nice looking? -



asp.net mvc 3 - Ugly url in mvc3-how make it nice looking? -

have action in ideas controller in aplication:

public viewresult newideas(int numberofpage = 1)

that action "produces" url that:

/ideas/newideas/?numberofpage=1

it's quite ugly-it should just:

/ideas/newideas/1

i know new maproute propably solve problem-but how should like? help.

you should add together new route in global.asax:

routes.maproute( "newideas", // route name "ideas/newideas/{numberofpage}", // url parameters new { controller = "ideas", action = "newideas", numberofpage= urlparameter.optional } // parameter defaults );

asp.net-mvc-3 url maproute

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -