c#

  • Serialize and Deserialize classes and objects in .Net

    Serialization is a powerful tool and a major factor in many intermediate development technologies such as webservices. Simply call “SerializeObject” and pass in the class name of your object for the “T” parameters, and your object will be serialized as… Continue reading

  • SVN Revision and Source Control

    What is revision control, a.k.a source control? At it’s core, what this term really means is a way for you to track changes that you may make over time to a particular file. Each time you change the file and… Continue reading

  • HTTP Post in C# .Net

    Why re-invent the wheel? 😉 See below for a few quick examples from the minds over at csharp-online and codeproject. Note: Any snippets may have been condensed from their original sources for brevity. See references for original articles. All examples… Continue reading

  • .Net Thread Safety

    Any future posts regarding thread safe calls will go here. C#: (field) C#: (singleton) Continue reading

  • URL Encode in .Net

    C#: (ASP .Net) C#: (Client/Server Environment) References MSDN, WebUtility Classhttp://msdn.microsoft.com/en-us/library/system.net.webutility.aspx MSDN, Uri Classhttp://msdn.microsoft.com/en-us/library/system.uri.escapeuristring.aspx MSDN blogs, http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx Continue reading

  • Quick .Net Encryption Reference

    The code below represents a very basic .NET encryption class which has been tested and should work in your application – simply plug and play. 🙂 Contains two static methods that can be called without needing to instantiate the class.… Continue reading

  • Quick .Net Email Reference

    I’ve done a bit of encapsulation here to abstract the concept into clearer functionality, IMO. Make sure to add “using” reference directives for System.Threading and System.Net.Mail accordingly, when necessary. Note usage of basic boolean “sync lock” style logic in place… Continue reading

  • Get Current URL in Javascript

    JS (JQuery): JS (standard): Continue reading

  • JQuery and Partial Postbacks

    I recently came across an issue where JQuery bindings no longer functioned after a partial postback and stumbled upon some code that was helpful in most cases. Javascript (JQuery): And alternatively.. This code will not always work however, as was… Continue reading

  • Get IP Address of Originating Website From a Webservice

    The following code was used in a .Net 3.5 web service to retrieve the IP Address of the website consuming it. This solution may initially escape you since it might seem like the web service should run within an HTTP… Continue reading