Welcome To Snipplr
Everyone's Recent Snippets Tagged c#
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
VS.NET Macro to list all projects in current solution that have TreatWarningsAsErrors=false.
0
810
posted 12 years ago by slolife
Just call "ProcessImageAndItsThumbnail" with your newly uploaded image's URL, and it will resize it for you, and make a thumbnail as well. Just remember to set the sizes you want for these new images.
1
987
posted 12 years ago by Krummelz
Properties that can be set are found here: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cde669f1-5714-4159-af95-f334251c8cbd.mspx?mfr=true
0
696
posted 12 years ago by jsturtevant
Overwrite LoadViewSate and SaveViewState page methods.
SaveViewState is called on initial page load and that is the place to save your negated flag to Session.
This value should be compared in LoadViewState and if the values are the same it means...
0
701
posted 13 years ago by Neven
ASCIIEncoding class has another method, GetByte(), which does the opposite of this one.
1
932
posted 13 years ago by roboninjapiratejesus
C#
TruncateOnWordBoundary - a useful extension method for cutting a string short, but not in the middle of a word.
Ever wanted a method that can truncate a string, but only on a word boundary? This method works like Substring() but doesn't snip a string in the middle of a word, i.e. it only truncates the string on a word boundary. Useful for producing a summary f...
1
1342
posted 13 years ago by stewartrae
Not that theres anything new to this. In fact its very old fashioned, but If you like me forget how its done; snip it.
0
849
posted 13 years ago by fengelz
use this if you want to make a binary use an older version of a dependent binery
1
701
posted 13 years ago by samwa
The only way i know to create a normal "fire property changed" method that is still efficient yet strongly typed. The other common pattern uses run time checking and uses the TyepDescriptor for the current type to check for property existence - a muc...
0
528
posted 13 years ago by nimast
I use these helper methods to create a jQuery based date text box with appropriate short date formatting.
0
723
posted 13 years ago by nkirkes