Date Selector
-
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
-
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
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.
-
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.
-
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.
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.
-
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.
-
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.
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 thesrc
andhref
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"> -
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 thesrc
andhref
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">