Welcome To Snipplr


Everyone's Recent C# Snippets



1 2 3 4 5 6 7 ... 16
This code demonstrates how to concatenate list of strings using lambda expression without need to use a loop.
1 338 posted 9 years ago by Neven
Create stored procedured in your database to handle users. Membership and Rulemanager. Type the line below in a commandprompt where "xxx.xx.xx.x" is IP to server and "mr" stands form membership and rulemanager.
0 324 posted 10 years ago by Barlon
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 303 posted 10 years ago by Neven
1 421 posted 10 years ago by Krummelz
Downloads contents as a byte array or string, depending on need.
0 384 posted 10 years ago by dkirkland
accessing getdev action of home controller which returns jsonresult
1 404 posted 10 years ago by root_hacker
0 257 posted 10 years ago by MysteryMeat
1 317 posted 10 years ago by jimfred
ASCIIEncoding class has another method, GetByte(), which does the opposite of this one.
1 421 posted 10 years ago by roboninjapiratejesus
this thing is a pain to configure
0 332 posted 10 years ago by amos24c
0 306 posted 10 years ago by amos24c
You do not have Page object available everywhere to use Page.ResolveUrl. Here is an alternate.
0 439 posted 10 years ago by plugables
Code snippet that allows developers to use a generic radiobuttonlist in the MVC Framework
0 263 posted 10 years ago by sommertim
Code snippet that allows developers to use a generic radiobuttonlist in the MVC Framework
0 291 posted 10 years ago by sommertim
Find how many factors there is in N! for a prime P Ex: 5! = (2^3)*(3^1)*(5^1) mult(5,2) = 3 mult(5,3) = 1 mult(5,5) = 1 all else = 0
0 272 posted 10 years ago by FMalk
Great tutorial for getting started with SharePoint custom web parts
0 359 posted 10 years ago by nickaranz
Sometimes things look terrible in CMSDesk. With just a few adjustments to the master page and its CS file you can target elements in an admin.css page.
0 225 posted 10 years ago by inreflection7
1 362 posted 10 years ago by darkbaron1912
0 261 posted 10 years ago by BrentS
0 255 posted 10 years ago by BrentS
Easily create Windows Forms Shortcuts with this class. For example: A shortcut to catch pasting via Ctrl + V. Shortcut sc = new Shortcut(this, new Action(() => MessageBox.Show("Data pasted!"))); sc.Keys.Add(Keys.ControlKey); sc.Keys.Add(Keys.V)...
0 396 posted 10 years ago by Currysuechtig
A simple, thread-safe wrapper class for lazy-loading data into an instance on-demand (i.e. when the instance is first accessed.) Usage: LazyLoader<Foo> l = new LazyLoader<Foo>(() => Foo.LoadFromDataSource("DB Connection String")); // For acc...
2 516 posted 10 years ago by stewartrae
Como insertar imgenes en un envio via email en ASP.NET
0 374 posted 10 years ago by derebus
0 282 posted 10 years ago by samdanae
0 349 posted 10 years ago by wedgardigitalwkscom
1 2 3 4 5 6 7 ... 16