Hi
I have some javascript that contains databinding expressions. I was trying to include this in my webpage as include file or by using RegisterStartUPScript
Here is the javascript
function ToggleStartDateCalendarPopup()
{
$find("<%= dpStartDate.ClientID %>").showPopup();
}
function ToggleEndDateCalendarPopup()
{
$find("<%= dpEndDate.ClientID %>").showPopup();
}
But then the page does not run and I get this error: Message: 'null' is null or not an object
I presume this is because of the data binding expressions. Is there anything I can do to include this javascript externally?
I tried putting the javascript in a usercontrol so that I could drop it on the pages that use this code but naturally the page wouldn't compile because the user control does not have a control called dpStartDate.
Any help is much appreciated
thanks