Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Calendar Control in ASP.Net using Ajax Toolkit

Calendar Control in ASP.Net using Ajax Toolkit

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadminhelp
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sudevsu
    wrote on last edited by
    #1

    I used a Calendar control in my ASP.Net code. I have three text boxes with three different calendar controls. But when I click on one calendar, other two calendars are also opening up. Also required field validators error messages are also showing beside the textboxes control. Here is my code

    <td width="34%"><asp:TextBox ID="txtClaimDate" runat="server" Width="100%" ></asp:TextBox>
    <asp:ImageButton runat="Server" ID="img3" ImageUrl="~/Images/Calendar_scheduleHS.png"
    AlternateText="Click to show calendar" /><br />
    <cc1:CalendarExtender ID="CalClaimDate" runat="server" TargetControlID="txtClaimDate"
    Format="yyyy-MM-dd" PopupButtonID="Image1">
    </cc1:CalendarExtender>
    </td>

    <td width="16.5%">
    <asp:TextBox ID="txtInDate" runat="server" Width="100%" />
    <asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/Images/Calendar_scheduleHS.png"
    AlternateText="Click to show calendar" /><br />
    <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtInDate"
    Format="yyyy-MM-dd" PopupButtonID="Image1">
    </cc1:CalendarExtender>
    </td>

    <td width="16.5%">
    <asp:TextBox ID="txtPuDate" runat="server" Width="100%" />
    <asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="~/Images/Calendar_scheduleHS.png"
    AlternateText="Click to show calendar" /><br />
    <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtPuDate"
    Format="yyyy-MM-dd" PopupButtonID="Image1">
    </cc1:CalendarExtender>
    </td>

    Now when I click on second calendar "txtIndate/Ca

    S 1 Reply Last reply
    0
    • S sudevsu

      I used a Calendar control in my ASP.Net code. I have three text boxes with three different calendar controls. But when I click on one calendar, other two calendars are also opening up. Also required field validators error messages are also showing beside the textboxes control. Here is my code

      <td width="34%"><asp:TextBox ID="txtClaimDate" runat="server" Width="100%" ></asp:TextBox>
      <asp:ImageButton runat="Server" ID="img3" ImageUrl="~/Images/Calendar_scheduleHS.png"
      AlternateText="Click to show calendar" /><br />
      <cc1:CalendarExtender ID="CalClaimDate" runat="server" TargetControlID="txtClaimDate"
      Format="yyyy-MM-dd" PopupButtonID="Image1">
      </cc1:CalendarExtender>
      </td>

      <td width="16.5%">
      <asp:TextBox ID="txtInDate" runat="server" Width="100%" />
      <asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/Images/Calendar_scheduleHS.png"
      AlternateText="Click to show calendar" /><br />
      <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtInDate"
      Format="yyyy-MM-dd" PopupButtonID="Image1">
      </cc1:CalendarExtender>
      </td>

      <td width="16.5%">
      <asp:TextBox ID="txtPuDate" runat="server" Width="100%" />
      <asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="~/Images/Calendar_scheduleHS.png"
      AlternateText="Click to show calendar" /><br />
      <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtPuDate"
      Format="yyyy-MM-dd" PopupButtonID="Image1">
      </cc1:CalendarExtender>
      </td>

      Now when I click on second calendar "txtIndate/Ca

      S Offline
      S Offline
      sudevsu
      wrote on last edited by
      #2

      I solved this upto one extend. I mean PopupbuttonId is same. It should be the image ID of their respective button. But now when I click on any calendar, It shows "*" for the fields. This means Requiredfieldsvalidator's error messages are "*" so it shows all the fields with "*". Please help in solving that.

      Your help is much appreciated. Thanks Happy Coding!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups