Category Archives: CodeProject

Finding the Longest substring in a string that is a palindrome

Hi, Recently my friend asked me this question so gave it a try and got it. So this is how the code goes: using System; using System.Collections.Generic; using System.Linq; namespace SubStringPalindrome { class Program { static int maxLength; static void … Continue reading

Posted in .NET, C#, CodeProject, General | Tagged , , , , , , | Leave a comment

‘yield’ Keyword in C#

Hi, This post is mainly about the ‘yield’ keyword provided in C#. I never really got a chance to use this keyword until now. So thought I would just blog about it. This blog is not of my own writing; … Continue reading

Posted in .NET, CodeProject, General | Tagged , , , , , , , | 2 Comments

Converting a string to stream and a stream to string in C#

Hi, Today I’ll just put a small post about converting a string to stream and a stream to string in C#. These conversions are pretty much simple but they did cause some trouble to me. So thought I would just … Continue reading

Posted in ASP.NET, CodeProject, General | Tagged , , , , , , , , , | 2 Comments

Accessing impersonated user’s details from code behind in C#

Hi all, Many of us might know that in web development, config files play a very important role. Reading config file entries in a code-behind file is a very common thing in web development. Config entries are stored in web.config … Continue reading

Posted in ASP.NET, CodeProject, General | Tagged , , , , , , , , , , , | Leave a comment

Moving items between ListBoxes using JavaScript

Hi Everyone, We all would have encountered the situation below where we are asked to select few items from a list of items. The selected items are transfered to another listbox by clicking a simple button. I have put a … Continue reading

Posted in ASP.NET, CodeProject, General | Tagged , , , , | Leave a comment

Retrieving column values as a comma separated string in SQLServer

Hi, This post is quite the opposite of the previous post. That is, in the previous post, We inserted a comma separated string into separate rows. Here we will return a single comma separated string by concatenating values from separate rows.   … Continue reading

Posted in CodeProject, General, SQL Server | Tagged , , , , | Leave a comment

Adding items in comma-separated string into separate rows in SQLServer

Hi, In this post, I’ll show how to insert a items in a comma-separated string into separate rows in a table. Consider for example we have a comma-separated string such as “amogh, anish, anvesh, uday”. after inserting into the table, … Continue reading

Posted in CodeProject, General, SQL Server | Tagged , , , , | 1 Comment

Uploading large files using asp.net and IIS6.0

Hi, We all must have obviously uploaded files somewhere or the other. Even in the websites that we create using ASP.NET, we might have to put the asp:fileupload control to facilitate file upload feature. While developing websites or web applications, … Continue reading

Posted in ASP.NET, CodeProject, General, IIS | Tagged , , , , , , , , , | Leave a comment

Error Condition: HttpException: maxRequestLength exceeded. ASP.NET

Hi, While building ASP.NET web applications, we all would have almost certainly used the file upload control. But sometimes, we might encounter an exception message which reads, “System.Web.HttpException: maxRequestLength exceeded”. The cause of this exception is simple. “maxRequestLength” attribute of … Continue reading

Posted in ASP.NET, CodeProject, General | Tagged , , , , , | 1 Comment