It is normal behaviour for an ASP.NET TextBox and other controls similar to it to lose their value through PostBack when they have the Disabled attribute set to True. To work around this behaviour, you can either use a Hidden type of field if you don’t want the user to see the value of the field in the page, or […]
Can I use my existing DLLs with ASP.NET?
If you have existing DLLs or COM objects developed and compiled in different languages such as Visual Basic, the good news is that you can use them in your ASP.NET web application just like any other DLLs. In Visual Studio, all you need to do is add a reference to the DLL via the Solution […]
What is the difference between command.com and cmd.exe?
If you’ve been using the DOS prompt even only rarely, you still encountered two different ways of bringing it up in Windows XP: command.com and cmd.exe. You can open each of them by specifying: “cmd” and “command” in the Run application of Windows XP or Windows Server 2003. In most of the cases when you […]
How to redirect using PHP
Using PHPs header() function you can easily redirect to an URL of your choice by passing a simple parameter. In the below example we will redirect the user to http://www.geekpedia.com. As you can see, we pass as a parameter a string starting with “Location: ” followed by the actual URL to which we wish to redirect the […]
How to destroy a session in PHP
You normally use sessions in PHP to store information about the user’s current session that will help you track him while he is browsing your website.Sometimes you will want to destroy that session or all the sessions registered to that user, for example when he wants to log out. The easiest way of destroying all […]
How to retrieve the installed ASP.NET version
It happens many times that you don’t have access to an ASP.NET server, except for FTP, and you’re interested in finding out the version of .NET Framework or ASP.NET that runs on that server.To find out what version of ASP.NET you have installed and running on a server, using ASP.NET itself, you can use the System.Environment.Version – […]
How to use if/else statements in SQL
The SQL query language supports if/else statements just like most programming languages, and in a similar fashion. Example: The main difference is that instead of using the curly brackets – { and } – BEGIN and END satatements are being used. Following the same flow, an if/else if/else statement looks like this:
What is the difference between #include and #include “”?
In C++ it’s common to see two methods of including a header file: The difference between the two varies on the compiler you are using, however the rule of thumb is that the first version, between the “<” and “>”, will have the compiler search for filename in a series of predefined paths. It is the standard […]
How to fix Cannot modify header information
Cannot modify header information – headers already sent by (output started at …) is a very popular error returned by PHP. You would receive this error if you are trying to set the header of a page after the header has already been sent to the client. There are two main ways of getting around […]
How to select the last inserted record from the identity column
In Microsoft SQL Server, the identity column provides you with an unique id for each record, which is auto-incremented.To get the last added record from the database you will often want to select the latest added ID. Many have the false impression that they can select the biggest ID (number), and that will be the […]