The easiest way to check the version of Windows on which your .NET application is running, is to use the following line: The above line should return something similar to “Microsoft Windows NT 5.1.2600 Service Pack 2” on a system running Windows XP SP2. However, if it does not, an alternative and more precise way […]
Binding a Repeater control to a jagged array
Binding the Repeater in the code-behind is done just like with any other binding operation. Suppose we have a jagged array named myJagged (which we didn’t initialize with values in this example) and a Repeater named myRepeater: // Initialize the string arraystring[][] myJagged; // Remember to initialize the array with valuesmyRepeater.DataSource = GroupList;myRepeater.DataBind(); While binding the array to the repeater is done the […]
Adding an item in a DropDownList at a certain position
In ASP.NET when you add a new item using a line such as the one below, and there are items already in the DropDownList, you will notice that this one is added at the bottom of the list. ddlMyList.Items.Add(“The Swan”);Sometimes you will be able to move this line in your code relative to the other […]
A disabled TextBox or similar control does not maintain its value through PostBack
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 – […]
Apple’s Search Evolution: The Integration of ‘Pegasus’
Apple Inc. has always been at the forefront of innovation, and its latest venture into enhancing search capabilities is no exception. The tech giant is reportedly working on a project codenamed ‘Pegasus’, which aims to revolutionize the way users interact with search functions across Apple’s ecosystem. Here’s what we know so far about Apple’s ambitious […]