views:

34

answers:

1

I want to design a calendar in asp.net mvc and I want to take month information as a string in address bar. What should I do? And after that I have to show this month from index.aspx. How can I do this?

+1  A: 

It's a little unclear what you're trying to do. If you're trying to present a calendar so that a user can input a date, I'd use jQueryUI's datepicker. The default style looks pretty nice, it's simple to use, and it works really well.

After re-reading your question, it seems you want your URL to be in some sort of date format. If this is the case, you need a custom route, like the one in this article. After you have created your custom route, printing the date is rather simple: pass the month part of the date from your controller down to your view and display it.

Esteban Araya