0

I want to add html in parameters

Example :

www.mystorenowopen.com/store.html/12/computer-it

i wrote

routes.MapRoute(
  "store",
  "store.html/{cid}/{title}",
  new { controller = "Home", action = "store" }
);


Its working fine but I want to

www.mystorenowopen.com/store/12/computer-it.html


how to do it


Pls help me

2
  • Can you show your controller? Commented Dec 5, 2013 at 8:35
  • Yep, and it's better to have StoreController with action "Index" instead of HomeController with action "store" (and it's better to capitalize the name of your method, because it is public). Commented Dec 5, 2013 at 8:36

1 Answer 1

1

Doesn't this work?

routes.MapRoute( "store", "store/{cid}/{title}.html", new { controller = "Home", action = "store" } ); 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.