Tag Archives: C#

C# How to get a QueryString value from the UrlReferrer

To get a QueryString value from the previous pages URL (aka: the UrlReferrer) you can use HttpUtility.ParseQueryString. Like this! NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(Request.UrlReferrer.Query); string keyword = nameValueCollection[“kw”]; “And that’s all I have to say about that.”

Posted in Web & Software Development | Tagged , | 4 Comments

How To: NHibernate Parent/Child Relationships

So you’re trying to setup a Parent/Child relationship using NHibernate. This is easy enough when you allow the foreign keys to be null in your database. Of course this is not desirable for data integrity so you disallow nulls. Now … Continue reading

Posted in Web & Software Development | Tagged , , | 2 Comments

If Then Else Shorthand in C#

Sometimes you need to use “If Then Else” logic on something really simple, but all those brackets and parentheses are ugly and confusing. So instead use some fancy shorthand! In this example I want to display the top 5 items … Continue reading

Posted in Web & Software Development | Tagged , | 16 Comments

Extend Visual Studio 2005 DataSet Designer Using Partial Classes

One of my favorite features of Visual Studio 2005 is the easy to use DataSet designer. If you haven’t tried using the DataSet designer to create your data access layer try it out. Brian Noyes has written a nice tutorial … Continue reading

Posted in Web & Software Development | Tagged , | Leave a comment

Tutorial on how to open and read an email using C# and POP3

For a recent project I found a great tutorial on how to read and manipulate emails using POP3 on Developer Fusion. Two things you should note when trying this code. 1) POP3 protocol won’t actually delete the email until you … Continue reading

Posted in Web & Software Development | Tagged , | 2 Comments