C#

April 24, 2014

MVC Model Binding with an Ajax Form Submit

By |2014-04-24T16:19:52+00:00April 24th, 2014|Categories: C#, MVC|Tags: , , , , |

You may come across a time where you would like to submit a form using Ajax, and still want to preserve the useful model binding of MVC. Normally when you submit a form using a standard submit (non async), the MVC framework will automatically take care of pulling your values out of your form and populating [...]

January 24, 2014

C# String extension method to escape characters for regular expressions (regex)

By |2014-01-24T07:43:31+00:00January 24th, 2014|Categories: C#, Handy Tools/Utilities|

I needed a way to escape special regex characters in a string. These characters include the following: ".", "$", "^", "{", "[", "(", "|", ")", "*", "+", "?", "\\" . This list was obtained from http://msdn.microsoft.com/en-us/library/4edbef7e(v=vs.110).aspx Here is a small string extension method that will accomplish this: Edit*- 1/24/13 - I didn't realize there was a built in [...]

Go to Top