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

calendar control

Scheduled Pinned Locked Moved ASP.NET
help
6 Posts 4 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
    scar_face
    wrote on last edited by
    #1

    hi, i am using an asp calendar control. i have written code for onSelectedIndexChange for the calendar control. but whenever i click on the calendar control, the whole page is getting refreshed. there is no autopostback property in the calendar control to stop refreshing the page. can anybody help me plz....

    scarface

    S A S 3 Replies Last reply
    0
    • S scar_face

      hi, i am using an asp calendar control. i have written code for onSelectedIndexChange for the calendar control. but whenever i click on the calendar control, the whole page is getting refreshed. there is no autopostback property in the calendar control to stop refreshing the page. can anybody help me plz....

      scarface

      S Offline
      S Offline
      Spunky Coder
      wrote on last edited by
      #2

      Can you show the code you have written..?

      "Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)

      S 1 Reply Last reply
      0
      • S Spunky Coder

        Can you show the code you have written..?

        "Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)

        S Offline
        S Offline
        scar_face
        wrote on last edited by
        #3

        hey, thanks for such a quick reply.... i have a button, which when clicked, opens the calendar(calendar is inside a div whose display is none in the begining. when button is clicked, the display is 'block', so the calendar shows up.) but when a value is selected in a calendar(server control), the whole page is refreshed and the div display is 'none' again. this happens everytime i click on the calendar control....

        scarface

        S 1 Reply Last reply
        0
        • S scar_face

          hi, i am using an asp calendar control. i have written code for onSelectedIndexChange for the calendar control. but whenever i click on the calendar control, the whole page is getting refreshed. there is no autopostback property in the calendar control to stop refreshing the page. can anybody help me plz....

          scarface

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          Rather than using ASP.Net calendar, you can go for any Java Script Calendar. or use Ajax Update panel to solve your problem.

          cheers, Abhijit CodeProject MVP

          1 Reply Last reply
          0
          • S scar_face

            hey, thanks for such a quick reply.... i have a button, which when clicked, opens the calendar(calendar is inside a div whose display is none in the begining. when button is clicked, the display is 'block', so the calendar shows up.) but when a value is selected in a calendar(server control), the whole page is refreshed and the div display is 'none' again. this happens everytime i click on the calendar control....

            scarface

            S Offline
            S Offline
            Spunky Coder
            wrote on last edited by
            #5

            scar_face wrote:

            when a value is selected in a calendar(server control), the whole page is refreshed

            That's the way it behaves...The Calendar control included with ASP.NET uses postbacks only. If you don't want the users to notice it use AJAX update panel and keep the Calender control inside it.(Or else you can write your own javascript calender.There are plenty of them available on the web).

            scar_face wrote:

            and the div display is 'none' again

            You need to run the javascript again...You have the register the clientscript and run the script again once the page refreshes.(Or else set the display: block again)

            "Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)

            1 Reply Last reply
            0
            • S scar_face

              hi, i am using an asp calendar control. i have written code for onSelectedIndexChange for the calendar control. but whenever i click on the calendar control, the whole page is getting refreshed. there is no autopostback property in the calendar control to stop refreshing the page. can anybody help me plz....

              scarface

              S Offline
              S Offline
              saanj
              wrote on last edited by
              #6

              Standard ASP.NET Calendar control will always do the postback. It is better to use the JavaScript, DHTML Calendar Controls. So many free JavaScript, DHTML Calendar controls are available free in the web. You can also use the AJAX calendar Control which will not do full postback. If you want to strict with the Standard ASP.NET calendar control, then I would suggest you to use AJAX Update Panel which removes full post backs.

              Either you love IT or leave IT...

              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