The newer versions of MSN Messenger are capable of adding contacts to your contact list by simply clicking a link. Note that the user needs to have MSN Messenger version 7.5 or newer open and running for this to work. Also, the code originally works within Internet Explorer, other browsers such as Firefox might implement […]
The name ‘Session’ does not exist in the current context
This error normally occurs when you are trying to access the value of a session variable such as Session[“UserID”] and you’re not doing that from a webform, usercontrol or a class that inherits from System.Web.UI. In this situation you can still access the session variable, but using a different path. For example to access a […]
What is the difference between #define and const?
While they both serve a similar purpose, #define and const act differently. When using #define the identifier gets replaced by the specified value by the compiler, before the code is turned into binary. This means that the compiler makes the substitution when you compile the application. Take for example: #define number 108 In this case […]
How can I insert a new line in a TextBox?
To insert a new line in a TextBox, first make sure you have the MultiLine property of the TextBox set to True. Then use \r\n (carriage return and new line), as in the following example:
How do I convert from decimal to hex and hex to decimal?
If for any reason you want to convert a decimal number to a hex value or vice versa here’s how it’s done in C#. In the above example we convert the decimal stored in the int variable named decValue and store it in a string variable named hexValue.Then we convert the hex value stored as […]
System.Web.HttpException: Maximum request length exceeded.
If you receive the ASP.NET error System.Web.HttpException: Maximum request length exceeded.” while trying to upload one or more files via HTTP, the cause is most likely a file uploading size limit that is set too low. The most accessible way to change this limit is through the web.config configuration file. Create this file if you […]