Vort3X

Stories submitted by Vort3X

Select Text or Value From DropDownList Extension Method(objectreference.net)

submitted by Vort3XVort3X(1335) 4 years, 1 month ago

I keep forgetting how to do it and end up spending ages searching for it, so here is a very usefull extension method that allows you to select an item from a DropDownList using the text or value of the item without needing to know the index of the item. read more...

add a comment |category: |Views: 21

tags: another

Being a “nice” programmer(objectreference.net)

submitted by Vort3XVort3X(1335) 4 years, 1 month ago

Being a C# developer by trade, I naturally spend a lot of my working life programming computers. Whilst I by no-means profess to be a “guru” of any kind, I do notice that there is one aspect of software development that is often neglected from discussion, and most programmers will hopefully agree with me as I explain. read more...

add a comment |category: |Views: 14

tags: another

Enum TryParse Extension Method(objectreference.net)

submitted by Vort3XVort3X(1335) 4 years, 1 month ago

TryParse method is very helpful if you need to convert string representation of a value to a value itself. TryParse is better than Parse method because it doesn’t throw any exceptions and just returns a Boolean value to indicate weather the parsing was successful. Surprisingly there is no TryParse method available to use for Enum and this is where extension method can be extremely useful. read more...

add a comment |category: |Views: 275

tags: another

To Extension Method(objectreference.net)

submitted by Vort3XVort3X(1335) 4 years, 1 month ago

Many times you find yourself having to convert the type of an object to another. The ToString() method is probably one of the most usefull methods, it's great for easy conversion of objects to string, but what if you want to do it the other way round. read more...

add a comment |category: |Views: 7

tags: another

Response.Redirect ThreadAbortException, why it’s a good thing(jonsagara.com)

submitted by Vort3XVort3X(1335) 4 years, 3 months ago

A couple of months ago, I ran into a problem where I was seeing a bunch of ThreadAbortExceptions showing up in my logs. It didn’t take long to track down why – I was calling Response.Redirect from within a try/catch block in my ASP.NET code-behind page, and the catch block was catching the ThreadAbortException and writing it out to the log. But why was the ThreadAbortException being generated? read more...

add a comment |category: |Views: 18

tags: another