HeartattacK

Browse by Tags

All Tags » C# (RSS)
How to Send Emails from .Net [example uses GMail SMTP]
We frequently see questions about sending emails using .Net in the asp.net forums. The process of sending mail is the same for Windows apps and asp.net websites as the same .Net classes are used. The process can be slightly shortened by specifying default...
Posted: Apr 28 2009, 12:10 PM by HeartattacK | with 3 comment(s)
Filed under: , ,
How to use Session values in an HttpHandler
When writing a custom HttpHandler, by default you have no access to the Session object. Doing something like HttpContext.Current.Session also returns null. The workaround is quite simple: Reference the System.Web.SessionState namespace: using System.Web...
Posted: Sep 18 2008, 03:30 PM by HeartattacK | with 13 comment(s)
Filed under: , ,
HTML Comments, Other Comments and Some VS Tips
I just found out something really weird about HTML comments. Apparently, according to standards, you can't do this: <!-- comment ------------------------ --> That is, you can't put two or more ‘-‘s inside a comment. It works as expected in IE7,...
Memorystream Not Expandable: Invalid Operation Exception
There's a little gotcha with the MemoryStream class that I just found out. It has 7 constructors. The default constructor has the stream set as expandable, with an initial capacity of 0. The ctors that take the capacity set the capacity to the param,...
Posted: Aug 25 2008, 02:31 AM by HeartattacK | with 7 comment(s)
Filed under: , ,
More Posts