Quantcast
Channel: ASP.NET / C# – Sam Lee's .NET Blog
Browsing all 15 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

csharp – how to send email with attachment

mailsetting in web.config : <configuration> <system.net> <mailSettings> <smtp from="your@from.com"> <network host="localhost" port="25" userName="your_username"...

View Article



Image may be NSFW.
Clik here to view.

.NET Parsing Email Guide

Case 1 : Parse Gmail Using POP3(SSL and non-SSL) : follow the direction on this link : http://www.codeproject.com/KB/applications/ReadGmailInboxMessage.aspx Case 2 : Parse Gmail Using IMAP4(for both...

View Article

Image may be NSFW.
Clik here to view.

change unkwonfile’s content type on visual studio

I use msbuild to deploy my web application. However, my .gz files was not copied to the production folder, so i was wondering why this was happening. .gz was a part of II7′s MIME types, so it was not...

View Article

Image may be NSFW.
Clik here to view.

ASP.NET MVC how to create custom enum attribute and get the attribute’s value

enum examples : enum MainNav { [Description("HOME")] [Url("/")] Home, [Description("BOURBON")] [Url("/Bourbon/KentuckyBourbon")] Bourbon, [Description("DISTILLERY")]...

View Article

Image may be NSFW.
Clik here to view.

Web.config Transformation Syntax for Web Application Project Deployment

http://msdn.microsoft.com/en-us/library/dd465326.aspx .NET 4 Framework.    

View Article


Image may be NSFW.
Clik here to view.

asp.net / Csharp Export to CSV from generic List

original post : http://www.joe-stevens.com/2009/08/03/generate-a-csv-from-a-generic-list-of-objects-using-reflection-and-extension-methods/ in my Utils.cs class : public static void...

View Article

Image may be NSFW.
Clik here to view.

ckeditor + ckfinder how to install example.

1. download and unzip ckeditor. 2. download and unzip ckfinder. your view page : <textarea name="BodyText" id="editor1" ></textarea> <script src="/Assets/scripts/ckeditor.js"...

View Article

Image may be NSFW.
Clik here to view.

how to resize, crop, save an image

http://www.switchonthecode.com/tutorials/csharp-tutorial-image-editing-saving-cropping-and-resizing

View Article


Image may be NSFW.
Clik here to view.

nHibernate many to many with mapping table example

Set has many Skus Sku has many Sets DB table Set <-> Setskus <-> Skus mapping.HasManyToMany(m => m.Skus) .Table("SetSkus") .ParentKeyColumn("SetId") .ChildKeyColumn("SKUId")...

View Article


Image may be NSFW.
Clik here to view.

IE9 ajax cache problem.

solve by adding this to the controller :   [OutputCache(NoStore = true, Duration = 0, VaryByParam="*")] public class ApiController : BaseController {

View Article

Image may be NSFW.
Clik here to view.

Rex.Split for comma outside of double quotation

</pre> StringBuilder sb = new StringBuilder(); var projectlist = new List<Project>(); var reader = new StreamReader(System.IO.File.OpenRead(@"C:\projectallocations.csv")); while...

View Article

Image may be NSFW.
Clik here to view.

ASP.NET vs Node.js comparison

IIS -> Node.exe C# / VB -> Javascript Entity Framework / SQL Server -> MongoDB or other Databae ASP.NET Web Forms -> Express + EJS ASP.NET MVC/Razor -> Express + Jade/Razor ASP.NET Web...

View Article

Image may be NSFW.
Clik here to view.

Hello World Node.js on Visual Studio 2012

1. download and install Node.js http://nodejs.org/ 2. download and install Node.js Visual Studio extension http://nodejstools.codeplex.com/ 3. create new project -> Other Languages -> JavsScript...

View Article


Image may be NSFW.
Clik here to view.

Web API : List to csv file download

StringHelper.cs public static string CreateCSVTextFile<T>(List<T> data) { var properties = typeof(T).GetProperties(); var result = new StringBuilder(); var header = properties.Select(x...

View Article

Image may be NSFW.
Clik here to view.

ASP.NET CSV download 한글깨짐현상

public ActionResult Download() { var data = Encoding.UTF8.GetBytes("some data"); var result = Encoding.UTF8.GetPreamble().Concat(data).ToArray(); return File(result, "application/csv", "foo.csv"); }...

View Article

Browsing all 15 articles
Browse latest View live




Latest Images