Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am new to C#.net MVC and am trying to add FullCalendar to an MVC application.

The FullCalendar script automatically adds ?start={}&end={} to the URL...which is fine, but I have no idea how to use querystring variables in a controller.

The methods I used in Webforms applications don't work. What do I need to add to the controller to access the querystring variables?

share|improve this question
The question seems vague. You need to mention the framework/language you are working on. – cyclotrojan Jul 14 '12 at 23:46
Sorry about that, I corrected it above. – davids Jul 14 '12 at 23:52

2 Answers

up vote 0 down vote accepted

I figured it out...finally found another article on it.

string start = Request.QueryString["start"];

string end = Request.QueryString["end"];
share|improve this answer
public ActionResult SomeAction(string start, string end)

The framework will map the query string parameters to the method parameters.

share|improve this answer
I had tried that already, but the parameters were never assigned. I don't know if it matters that the querystring parameters were unixtimestamps, but neither double nor sting had any values when I tried this approach. – davids Jul 15 '12 at 1:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.