Accessing Calendar from MVC Controller

2 posts, 0 answers
  1. Mark
    Mark avatar
    2 posts
    Member since:
    Dec 2008

    Posted 18 Dec 2008 Link to this post

    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.
     
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 23 Dec 2008 Link to this post

    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.
Back to Top