Archive

Archive for the ‘Quick Tip’ Category

How To Fix: ‘Sys’ is undefined or ‘AjaxControlToolkit’ is undefined javascript errors

September 15th, 2011 No comments

I developed an ASP.NET application for my company that is configured on several laptops. Yesterday I was given the task to fix an error that was causing the ASP.NET Ajax features to flake and not work. I spent hours on Google searching for an answer. If you did before reading this article, I wont be asking you to edit your web.config file or setting the CombineScripts property for the ToolkitScriptManager to false. I tried all of those and alas the problem remained. You are free to try those if my solution does not work for you.

I fixed this issue by pure chance. While troubleshooting, I realized that the clock was showing the incorrect date and time. I merely corrected that and realized soon after that everything worked flawlessly. There were no moreĀ ‘Sys’ is undefined or ‘AjaxControlToolkit’ is undefined javascript errors. I figured this error occurs since the last modified date on the assemblies associated with ‘Sys’ and ‘AjaxControlToolkit’ would have had a future date and caused a problem. What problem specifically? I am unable to answer even after some research on Google.

I hope that my solution will save you some time. Please let me know in the comments if it helped!

Quick Tip: Centering A Website Using CSS

May 15th, 2011 No comments

It's very easy to centre your website using CSS. All you have to do is apply the following CSS to your website's outermost container, even if it is a table or div element. Also, remember that the container must have a defined width!

HTML
<div class="container">...website markup here...</div>
CSS
div.container {margin-left: auto; margin-right: auto; width: 1024px;}
Categories: Code Snippets, CSS, Quick Tip Tags: