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:

Reading Text Files in .NET – The Easy Way

November 21st, 2010 No comments

I don't know about you fellow .NET programmers, but I don't often come across a need to read from text files often when I am programing in .NET. As such, I find that every time I need to do this, I have to use Google to refresh myself on how to do it. Recently, i found a much easier  way of reading text files that I felt compelled to share.

VB.NET
Dim s as String
Dim file_path as String = "C:\test.txt"

'Storing the text from the test.txt file in a string variable
s = System.IO.File.ReadAllText(file_path)
C#
string s;
string file_path = "C:\test.txt";

//Storing the text from the test.txt file in a string variable
s = System.IO.File.ReadAllText(file_path);

I hope this is as useful to you as it was for me.

Categories: C#, Code Snippets, VB.NET Tags: ,

Implementing JavaScript Alert on Server Side

October 17th, 2010 1 comment

Ever so often, an application must communicate with its user when it is working. The most basic of methods is to display a popup message, usually when a task is complete or some error has occurred. In windows form programming, displaying a popup message box to the user is really easy. Unfortunately, this is not so simple when doing web programming, specifically ASP.NET. There is no native method to initiate a message box in ASP.NET. Read more…

Resolving Connection Error with MySQL Migration Toolkit

June 2nd, 2010 9 comments

If you are here because you are getting the dreaded “Network error IOException: Connection Refused: connect in MS SQL Server 2000” error message with the MySQL migration toolkit and need a solution, then you have come to the right place. Read more…

Handling Null Values in SQL Server

May 28th, 2010 7 comments

From time to time, we may want to replace NULL values with some desired value when doing an sql select statement. Turns out that SQL Server makes this a simple task – and no IF statements are necessary! To do this, we use SQL Server's ISNULL function. This function takes two parameters. The first parameter is the name of the field that we expect may have a NULL value that we wish to replace. The second parameter represents the replacement value for the NULL value. Read more…

Categories: SQL Server Tags: , ,

5 Great Web Developer Tools

February 8th, 2010 No comments

A web developer’s life is never an easy one. I know and understand this, and so I thought I would share my top five, must have, tools that I use from day to day. They are in no particular order and are great tools. They have saved me countless hours of additional work and have made my work so much more tolerable. Read more…

Alternative to MySQL’s LIMIT Command

December 20th, 2009 12 comments

I recently ran into the situation where I needed to create a query in MySQL that counted up to n rows from a result set. I scoffed at the challenge and proceeded to go for the one tool I thought could do the job – MySQL's LIMIT command. Unfortunately, the result I got was not what I had expected. Read more…

Categories: MySQL Tags: , , , ,

ASP.NET from Scratch Tutorial Series

December 14th, 2009 5 comments

Very good screencast that introduces ASP.Net. Authored by Jeremy McPeak and hosted at Nettuts. So far there are only two lessons available. I will continue to update this post as more becomes available. Read more…

Categories: ASP.Net Tags: , ,

I Am Back!

September 30th, 2009 No comments

After being absent for way too long, I decided to dust off this blog and try running with it again. I must say that I am much more experienced than when I first started this blog and I have so much more to share.

I will be sharing this information with everyone in the coming weeks. I thought I would start thing off by writing a tutorial to make your own blog, albeit will only have the bare minimum features. So you can look out for that. Read more…

Categories: Uncategorized Tags: