How to make a HTML table fill the whole screen

When creating a table with width=100%, the table will not fill the whole screen and there is a thin white space between the screen and the top, left, and right side of the table. To make the table actually fill the whole screen, we need to use CSS. In the CSS file, add “margin: 0px; padding: 0px;” to the Body tag as follows: Body { … margin: 0px; padding: 0px; } If you use FireFox, […]

File size limitations with the File Field Control in ASP.NET

By default, the maximum size of a file to be uploaded to the server using the File Field control is around 4MB. But we can make some changes in either the machine.config or web.config to increase or decrease the size limitations: In the machine.config file, find a node called <httpRuntime> that looks like the following: <httpRuntime executionTimeout = “90” maxRequestLength = “4096” useFullyQualifiedRedirectUrl = “false” minFreeThreads = “8” minLocalRequestFreeThreads = “4” appRequestQueueLimit = “1000” /> […]

Designer causes a Just-In-Time Error

Recently, I am getting a Just-In-Time error with Visual Studio.NET 2003, and the error is very unpredictable. It happens when I am working in the Designer. Last time it happened was when I selected a TextBox control and moved my mouse over the Properties Window(I set my Properties Window ‘Auto Hide’), then I got a dialog box that stated “Just-In-Time Debugging. An exception ‘System.ExecutionEngineException’ has occurred in DefaultDomain.” And then I got a choice of […]

Run server control event handler before executing javascript

Sometimes, we need to run the event handler of a server control before executing some javascript code. For instance, when user clicks a button called “Save and Close Window”, the application saves data into database, then closes the window automatically. How can we accomplish this? We can’t add an “onclick” javascript to the button’s attributes, because if we do, then the application will run the javascript code and thus close the window before it even […]

Datagrid inline editing problem: textbox does not hold new value

I had a problem with DataGrid inline editing last Friday: I click the “Update” LinkButton in the DataGrid, but the DataGrid still shows the old value. After stepping into the source code, I found that the TextBox in the DataGrid under the editing mode still holds the old value, and the value that I typed in seems to be lost somehow. Well, I thought it might be the ViewState issue, so I checked the ViewState […]

AJAX Tutorial

AJAX is becoming a hot topic in Web applications and it seems that every Web developer is talking about it or advocating it or criticizing it, or whatever. Some even refer it as “future of the Web”. What in the world is AJAX then? First of all, AJAX is NOT a language. Secondly, AJAX stands for Asynchronous JavaScript and XML. It is just a technique, actually an old technique called remote scripting which allows client-side […]

PDF Tools

I have found three FREE utilities that can convert any file format to PDF format. They are BullZip PDF Printer, CutePDF Writer, and PrimoPDF. They are not actual software because all they do is to create a virtual printer in you Windows system, and when you select the virtual printer to print a file, it will automatically convert the file to PDF format. I have tried all of them and found PrimoPDF the best for […]

Login failed for user ‘…’. Reason: Not associated with a trusted SQL Server connection

Just got my new development computer set up, here is the machine information: Dell PRECISION 380 Workstation CPU: Pentium 4 3.4GHz RAM: 2GB Hard drives: 2 X 250GB with RAID controller Video card: nVidia Quadro FX1400 dual head support with DVI output DVD ROM and DVD-RW ROM Monitor: 2 X Dell 19″ Flat Panel I had been working on it in the past few days to get it set up and to transfer files from […]

Integrate Windows XP SP2 into installation CD

Think about the following scenario: You have a Windows XP installation CD without any service pack, like those old ones, and you download the Service Pack 2 from Microsoft website. Now you want to re-install your computer (you know it is very common with Windows, isn’t it!), what do you do? First, install Windows XP, then install the Service Pack 2. But, have you ever thought about the integration of the Windows XP installation CD […]

Windows users: how to secure your system

Many Windows users don't think much about the security of the Windows system they are using, because most of them have little knowledge of the potential security issues they are facing and think that Windows should handle the security automatically. The reality, however, is that the Windows system out-of-box has many security vulnerabilities which may be exploited by hackers to take control of user's computer to do more harmful things. For example, when you use […]