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. Date Selector

Date Selector

Scheduled Pinned Locked Moved ASP.NET
htmlasp-netcomhelp
7 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.
  • S Offline
    S Offline
    shaoen86
    wrote on last edited by
    #1

    I am using the coding of the date selector from the link below. Below is the link: [HTML]http://www.codeproject.com/aspnet/ASPNET\_DateSelector.asp\[/Html\] I place the scripts and images folders into another folder called DateSelector. The web form that is using the date selector is inside another folder called Web development. And i did the following code below to register the control. [Code]<%@Register TagPrefix="SControls" TagName="DateSelector" src="../DateSelector/DateSelector.ascx" %> [/Code] But the calendor does not pop up when i click on it. However it works fine if i put the images and scripts folders into the Web Development folder. This is not a very big problem but i like all folders to neatly categorized in folders. If anyone knows why, please let me know. Thank you

    M 1 Reply Last reply
    0
    • S shaoen86

      I am using the coding of the date selector from the link below. Below is the link: [HTML]http://www.codeproject.com/aspnet/ASPNET\_DateSelector.asp\[/Html\] I place the scripts and images folders into another folder called DateSelector. The web form that is using the date selector is inside another folder called Web development. And i did the following code below to register the control. [Code]<%@Register TagPrefix="SControls" TagName="DateSelector" src="../DateSelector/DateSelector.ascx" %> [/Code] But the calendor does not pop up when i click on it. However it works fine if i put the images and scripts folders into the Web Development folder. This is not a very big problem but i like all folders to neatly categorized in folders. If anyone knows why, please let me know. Thank you

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, I haven't used this control, but IMO the problem is with the path of the resource files. You might need to check the source code of the control and update the behaviour so that at runtime it can reference to the image and script files in a specific folder instead of the root of the application.

      S 1 Reply Last reply
      0
      • M minhpc_bk

        Hi there, I haven't used this control, but IMO the problem is with the path of the resource files. You might need to check the source code of the control and update the behaviour so that at runtime it can reference to the image and script files in a specific folder instead of the root of the application.

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

        I have checked my source code when i register the control and its absolutely correct as i have referenced to other javascripts as well. Can you give me an example on how to do that? Sorry, but i am a newbie to asp so not very sure.

        M 1 Reply Last reply
        0
        • S shaoen86

          I have checked my source code when i register the control and its absolutely correct as i have referenced to other javascripts as well. Can you give me an example on how to do that? Sorry, but i am a newbie to asp so not very sure.

          M Offline
          M Offline
          minhpc_bk
          wrote on last edited by
          #4

          No, I mean you should have a look at the source code of the control. You can also learn more about this by viewing the source of the web page in the browser at runtime. When you click the icon, the client side script should be running to pop up the calendar I guess. At the moment, the script is placed at the application root, and you can modify to make it work in a specific folder.

          S 1 Reply Last reply
          0
          • M minhpc_bk

            No, I mean you should have a look at the source code of the control. You can also learn more about this by viewing the source of the web page in the browser at runtime. When you click the icon, the client side script should be running to pop up the calendar I guess. At the moment, the script is placed at the application root, and you can modify to make it work in a specific folder.

            S Offline
            S Offline
            shaoen86
            wrote on last edited by
            #5

            Yeah, the client side script source is correct. With ot without the extra folder that i want it to work in. I think it must be something else that is wrong.

            M 1 Reply Last reply
            0
            • S shaoen86

              Yeah, the client side script source is correct. With ot without the extra folder that i want it to work in. I think it must be something else that is wrong.

              M Offline
              M Offline
              minhpc_bk
              wrote on last edited by
              #6

              Like I said, when you look at the source content of the user control DateSelector.ascx or when you view source the web page, you will see something like:

              <script language="javascript" src="cal/popcalendar.js"></script>
              <LINK href="cal/popcalendar.css" type="text/css" rel="stylesheet">

              If the web page is placed in the same folder of the user control and the cal sub folder, it will work just fine. If you place the web page in the another folder such as the Web Development one, then the links to the .cs and .css files are not correct and as a result it does not pop up the calendar. In this case, you simply edit the src and href attributes of those elements. For example, your web page is placed in the Web Develoment which is in the same level of the DateSelector, the path can be edited as below:

              <script language="javascript" src="../DateSelector/cal/popcalendar.js"></script>
              <LINK href="../DateSelector/cal/popcalendar.css" type="text/css" rel="stylesheet">

              S 1 Reply Last reply
              0
              • M minhpc_bk

                Like I said, when you look at the source content of the user control DateSelector.ascx or when you view source the web page, you will see something like:

                <script language="javascript" src="cal/popcalendar.js"></script>
                <LINK href="cal/popcalendar.css" type="text/css" rel="stylesheet">

                If the web page is placed in the same folder of the user control and the cal sub folder, it will work just fine. If you place the web page in the another folder such as the Web Development one, then the links to the .cs and .css files are not correct and as a result it does not pop up the calendar. In this case, you simply edit the src and href attributes of those elements. For example, your web page is placed in the Web Develoment which is in the same level of the DateSelector, the path can be edited as below:

                <script language="javascript" src="../DateSelector/cal/popcalendar.js"></script>
                <LINK href="../DateSelector/cal/popcalendar.css" type="text/css" rel="stylesheet">

                S Offline
                S Offline
                shaoen86
                wrote on last edited by
                #7

                You are absolutely right! Thanks for your help and it works fine right now. Cheers! :)

                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