ASP Calendar problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gregster17
    New Member
    • May 2010
    • 2

    #1

    ASP Calendar problems

    Code:
    <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="Title" runat="server">
        
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <form id="form1" runat="server">
        <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
        </form>
    </asp:Content>
    This is the code I'm using to display a calendar in a MVC 2 web application project I'm currently working. The code works properly and when I open the view in mozilla it displays the calendar, however that is all it does. I understand that the dates don't and shouldn't do anything when clicked on because I haven't edited the function that handles that. From my understanding (searching the internet and looking at examples) the default calendar should be able to change months, but mine is not. I know there is a control called OnVisibleMonthC hanged and I have unsuccessfully tried implementing that. My basic question is does the default asp calendar change the months or do I need to implement it because I haven't found any helpful resources in doing this. Thanks for any helpful hints.
  • ThatThatGuy
    Recognized Expert Contributor
    • Jul 2009
    • 453

    #2
    Originally posted by gregster17
    Code:
    <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="Title" runat="server">
        
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <form id="form1" runat="server">
        <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
        </form>
    </asp:Content>
    This is the code I'm using to display a calendar in a MVC 2 web application project I'm currently working. The code works properly and when I open the view in mozilla it displays the calendar, however that is all it does. I understand that the dates don't and shouldn't do anything when clicked on because I haven't edited the function that handles that. From my understanding (searching the internet and looking at examples) the default calendar should be able to change months, but mine is not. I know there is a control called OnVisibleMonthC hanged and I have unsuccessfully tried implementing that. My basic question is does the default asp calendar change the months or do I need to implement it because I haven't found any helpful resources in doing this. Thanks for any helpful hints.
    What r u exactly trying to say?

    Comment

    • gregster17
      New Member
      • May 2010
      • 2

      #3
      I pretty much want to know if the default asp calendar already implements month changing or do you have to code it yourself.

      Comment

      • ThatThatGuy
        Recognized Expert Contributor
        • Jul 2009
        • 453

        #4
        Originally posted by gregster17
        I pretty much want to know if the default asp calendar already implements month changing or do you have to code it yourself.
        of course it does.... click on the month arrow keys on the control

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          In MVC you should not be using ASP.NET controls.

          I'm not sure what is available to you in MVC but I think that you should take a look at what jQuery has to offer you in the way of calendars.

          Comment

          Working...