This is a migrated thread and some comments may be shown as answers.

Accessing Calendar from MVC Controller

1 Answer 52 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 18 Dec 2008, 09:38 PM
Sorry to ask this question, when I should spend the time to work it out myself, but I'm on a deadline and need to prove that the Telerik ASP.Net controls will work in an MVC environment.

So, how do I access a RadCalendar (in a View) from within my controller action. Am I right that I should be able to access it's state via a incoming parameter some how? 

Perhaps there is a post, or example, or article someone could point me to? I searched without success.

Thanks in advance.
 

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 23 Dec 2008, 03:17 PM
Hi Mark,

You can pass values to your controller action using input type="hidden":

 <form method="post" action="/Home/YourAction">
<input type="hidden" id="yourVariableName" name="yourVariableName" />
<input type="submit" value="Post" />
</form>
...
        public ActionResult YourAction(string yourVariableName)
        {
             return View();
        }

You can use the calendar client-side events to fill the hidden input with desired value.

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Mark
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or