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. General Programming
  3. C#
  4. Calender control in asp.net

Calender control in asp.net

Scheduled Pinned Locked Moved C#
csharpasp-netsysadmintutorialquestion
3 Posts 2 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.
  • H Offline
    H Offline
    HowRU
    wrote on last edited by
    #1

    Hi all, How to use a textbox control along with a calender control in asp.net codebehind is C#. onclick of the calender's particular date the day/month/year should be put in the 3 textbox respectively?. How to code for this. On server side or client side. because i want that dates comparison also. thanks in advance

    A 1 Reply Last reply
    0
    • H HowRU

      Hi all, How to use a textbox control along with a calender control in asp.net codebehind is C#. onclick of the calender's particular date the day/month/year should be put in the 3 textbox respectively?. How to code for this. On server side or client side. because i want that dates comparison also. thanks in advance

      A Offline
      A Offline
      Aryadip
      wrote on last edited by
      #2

      hi, Let me first clarify what I have understood from your requirement... You have a calender control on the web page and 3 textboxes. When the user selects a date the day month and year component should get displayed in the 3 text boxes... If this is so... then herez the code... private void CalMain_SelectionChanged(object sender, System.EventArgs e) { DateTime selDate = ((Calendar)sender).SelectedDate; txt1.Text = selDate.Day.ToString(); txt2.Text = selDate.Month.ToString(); txt3.Text = selDate.Year.ToString(); } Note : This code is server side. regards, Aryadip. Cheers !! and have a Funky day !!

      H 1 Reply Last reply
      0
      • A Aryadip

        hi, Let me first clarify what I have understood from your requirement... You have a calender control on the web page and 3 textboxes. When the user selects a date the day month and year component should get displayed in the 3 text boxes... If this is so... then herez the code... private void CalMain_SelectionChanged(object sender, System.EventArgs e) { DateTime selDate = ((Calendar)sender).SelectedDate; txt1.Text = selDate.Day.ToString(); txt2.Text = selDate.Month.ToString(); txt3.Text = selDate.Year.ToString(); } Note : This code is server side. regards, Aryadip. Cheers !! and have a Funky day !!

        H Offline
        H Offline
        HowRU
        wrote on last edited by
        #3

        Hello Aryadip Thanks! that code is working & comparitively it's so simple.

        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