April 26th, 2006

Open a New Browser Window From an ASP.Net Server Control

All ASP.Net controls add functionality to your web application by performing postbacks to the server. When they post back, their events are captured by the web server. So if you add an onclick event to a button, it will be a server-side event. But what if you need a button to open a window or JavaScript prompt when you click on it? This is a client-side event, and there's no way to add this property to an ASP.Net server control it would seem. Here's the code to allow you to do it programmatically. (more…)

April 26th, 2006

Have You Been Framed? Use JavaScript to Break the Frames!

A rather unscrupulous practice by some webmasters is falsifying content on their site by simply putting your content or site in a frame or iframe on their website. Well with this handy little code snippet you can make sure that no site frames yours. (more…)

April 25th, 2006

Create a Code Preview Box on Your Website

If you post any client-side code on your website, it would be nice for people to be able to work with it and test or preview it live. This code uses an iframe to enable real-time viewing of your code. You could use this simply as a DHTML code editor, or you could even extend it to create your own WYSIWYG editor for your web application! (more…)

April 25th, 2006

Create Foreign Keys in MySQL

If you're using/controlling MySQL from a GUI tool, you may have the ability to easily add foreign key constraints. However, if you have to use the command prompt, here's the SQL statement code to manually add a foreign key constraint. (more…)

April 24th, 2006

Login and Upload Files to an FTP Server With PHP

I previously posted the code to FTP files from an ASP page. Of course it would be handy to be able to upload files from a PHP web application to an FTP server as well. This code will detect any connection errors, and you can modify the code to upload as many files as you need. (more…)

« Previous PageNext Page »