c-sharpe.blogspot.com
C# and ASP.NET Code: Easy Syntax to Print List Elements
http://c-sharpe.blogspot.com/2009/06/easy-syntax-to-print-list-elements.html
C# and ASP.NET Code. C# and .NET tips and code snippets. Thursday, June 11, 2009. Easy Syntax to Print List. List string myList = new List string { "a", "b", "c", "d"};. A list-printing delegate :. Action string print = elem = { Console.WriteLine(elem);};. January 4, 2010 at 10:00 AM. Thanks for the tip which led me to aanother one. August 26, 2010 at 4:48 PM. This can actually be reduced to a one liner:. MyList.ForEach(x = {Console.WriteLine(x);});. Subscribe to: Post Comments (Atom). Add List to App...
c-sharpe.blogspot.com
C# and ASP.NET Code: December 2014
http://c-sharpe.blogspot.com/2014_12_01_archive.html
C# and ASP.NET Code. C# and .NET tips and code snippets. Monday, December 15, 2014. Editor Template for Boolean Property in Razor. If you want to display 2 radio buttons for a boolean property in Razor with Yes and No labels, this is how you could do it. Create your own editor template and put it in the Shared/EditorTemplate folder. Using System.Web.Mvc. HtmlRadioButtonFor(model= model, false) No. HtmlRadioButtonFor(model = model, true) Yes. Links to this post. Subscribe to: Posts (Atom). Add List to App...
c-sharpe.blogspot.com
C# and ASP.NET Code: Deploy ASP MVC on IIS 6
http://c-sharpe.blogspot.com/2013/09/deploy-asp-mvc-on-iis-6.html
C# and ASP.NET Code. C# and .NET tips and code snippets. Wednesday, September 4, 2013. Deploy ASP MVC on IIS 6. This post just complements information already available online. There are certain steps you need to do first before your ASP MVC application can run in IIS 6. Screen, on the Directory. Tab, click Insert. To insert a wildcard application map:. Browse to the location of the aspnet isapi.dll file. Make sure that Verify that file exists. Subscribe to: Post Comments (Atom). C Razor Sharp .NET.
c-sharpe.blogspot.com
C# and ASP.NET Code: Get TreeNode from Full Path in Winform
http://c-sharpe.blogspot.com/2010/01/get-treenode-from-full-path.html
C# and ASP.NET Code. C# and .NET tips and code snippets. Friday, January 8, 2010. Get TreeNode from Full Path in Winform. This is a recursive method that finds a TreeNode. In a NET TreeView. Control from its full path. TreeNode GetNodeFromPath(TreeNode node, string. TreeNode foundNode = null. FoundNode = GetNodeFromPath(tn, path);. May 6, 2010 at 4:05 AM. Too bad theres no built-in function from Microsoft, could have been a bit quicker than a recursive tree search. May 25, 2010 at 6:54 AM. This is a recu...
c-sharpe.blogspot.com
C# and ASP.NET Code: Create Separate Dropdowns for Day, Month, Year in ASP.NET MVC
http://c-sharpe.blogspot.com/2014/10/create-separate-dropdowns-for-day-month.html
C# and ASP.NET Code. C# and .NET tips and code snippets. Thursday, October 23, 2014. Create Separate Dropdowns for Day, Month, Year in ASP.NET MVC. Create a structure that will hold the Month, Day and Year fields:. Your model class should contain the following properties;. Date, Month and Year collections and add them to the ViewBag. In the view, create dropdowns and populate them with collections in the ViewBag. It is important that the select element names match the property names in the model. Buildin...
c-sharpe.blogspot.com
C# and ASP.NET Code: February 2014
http://c-sharpe.blogspot.com/2014_02_01_archive.html
C# and ASP.NET Code. C# and .NET tips and code snippets. Thursday, February 27, 2014. Replace foreach with Extension Methods and Lambda Expressions. I suppose many of us use the foreach. Statement very often in our code. I'll show you how to replace simple foreach. Statements with new lambda expressions. Suppose you want to create a List string of names of files residing in a directory. This is how you could do it. Set up an array of FileInfo objects:. FilePath = @"C: Temp". Create a string type List:.
c-sharpe.blogspot.com
C# and ASP.NET Code: July 2013
http://c-sharpe.blogspot.com/2013_07_01_archive.html
C# and ASP.NET Code. C# and .NET tips and code snippets. Thursday, July 18, 2013. If you have 2 objects that do not inherit from each other but have similar properties, here is a function you can use to copy property values from one object to the other:. Public static void CopyIdenticalProperties (this object source, object dest). Var plist = from prop in source.GetType().GetProperties(). Where prop.CanRead & prop.CanWrite. Foreach (PropertyInfo prop in plist). Links to this post. C Razor Sharp .NET.
c-sharpe.blogspot.com
C# and ASP.NET Code: Get List of Allowed Values in TFS Work Item Field
http://c-sharpe.blogspot.com/2009/12/get-list-of-allowed-values-in-tfs-work.html
C# and ASP.NET Code. C# and .NET tips and code snippets. Wednesday, December 9, 2009. Get List of Allowed Values in TFS Work Item Field. This is how you can obtain programmatically a list of allowed values in a TFS Work Item field (in the example below, in Priority field in Bug template):. TeamFoundationServer tfs = new. WorkItemStore wis = (WorkItemStore)tfs.GetService( typeof. Project teamProject = wis.Projects[ myTeamProjectName. WorkItemType wit = teamProject.WorkItemTypes[ Bug. When you export a Gri...
c-sharpe.blogspot.com
C# and ASP.NET Code: Copy Property Values
http://c-sharpe.blogspot.com/2013/07/copy-property-values.html
C# and ASP.NET Code. C# and .NET tips and code snippets. Thursday, July 18, 2013. If you have 2 objects that do not inherit from each other but have similar properties, here is a function you can use to copy property values from one object to the other:. Public static void CopyIdenticalProperties (this object source, object dest). Var plist = from prop in source.GetType().GetProperties(). Where prop.CanRead & prop.CanWrite. Foreach (PropertyInfo prop in plist). Subscribe to: Post Comments (Atom). Buildin...
c-sharpe.blogspot.com
C# and ASP.NET Code: GetWebProxy
http://c-sharpe.blogspot.com/p/getwebproxy.html
C# and ASP.NET Code. C# and .NET tips and code snippets. Http:/ proxy.example.net:8080/. Create a new Uri object. Associate the newUri object to 'myProxy' object so that new myProxy settings can be set. Create a NetworkCredential object and associate it with the. Proxy property of request object. Subscribe to: Posts (Atom). Get TreeNode from Full Path in Winform. This is a recursive method that finds a TreeNode in a .NET TreeView control from its full path. public TreeNode GetNodeFromPath(TreeNod. Toront...