<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-741138771118067810</id><updated>2012-02-17T08:17:18.554+08:00</updated><title type='text'>My Technical Side</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://technicalside.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/741138771118067810/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://technicalside.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Radius</name><uri>http://www.blogger.com/profile/16395614055057007613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/221/467124565_84253245cf_m.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-741138771118067810.post-2763958567239716219</id><published>2008-04-29T18:17:00.003+08:00</published><updated>2008-04-29T19:18:14.587+08:00</updated><title type='text'>ASP.NET, Sending mail with attachment</title><content type='html'>Unlike PHP, sending mail out with ASP.NET is always troublesome especially if you are sending it from a shared hosting company and you don't have much access towards it except using FTP.  I was having a major headache while trying to send email out from client's hosting site while it has been working properly on my development server. The problem started when i'm trying to send the email with the attachment. I cant get proper permission for the folder to upload the attachment thus giving me trouble to upload the file and attach it. I found several solutions which at the end only one of them that helps. This is one of the solution which i found STUPID:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    "&lt;br /&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;    Dim&lt;/span&gt;&lt;span&gt;  msg &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt;      Net.Mail.MailMessage(&lt;/span&gt;&lt;span&gt;txtFrom.Text,&lt;/span&gt;&lt;span&gt;txtTo.Text,&lt;/span&gt;&lt;span&gt;txtSubject.Text,&lt;/span&gt;&lt;span&gt;txtMessage.Text)&lt;/span&gt;&lt;br /&gt;&lt;p style="font-style: italic; text-align: left;" class="ArticleText"&gt;    &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;span&gt;  fileUpload.PostedFile.FileName = &lt;span style="color:maroon;"&gt;""&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color:blue;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span&gt;       msg.Attachments.Add(&lt;/span&gt;&lt;span style="color:blue;"&gt; New&lt;/span&gt;&lt;span&gt;  System.Net.Mail.Attachment&lt;/span&gt;&lt;span&gt;(fileUpload.PostedFile.FileName))&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt; End&lt;/span&gt;&lt;span&gt; &lt;span style="color:blue;"&gt;If"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;taken from &lt;a href="http://www.beansoftware.com/ASP.NET-Tutorials/Send-E-Mail.aspx"&gt;this stupid site &lt;/a&gt; He didn't even bother to use &lt;span style="font-style: italic;"&gt;fileUpload.HasFile&lt;/span&gt; to check if the control has any file attached to it but use &lt;span style="font-style: italic;"&gt;.Filename =""&lt;/span&gt; instead. Either lazy or stupid programmer.&lt;br /&gt;&lt;br /&gt;At the end I managed to find a solution which I think it's the best for my situation which I can't upload the file to a folder those, by using stream I can attach the file without even executing any IO to the disk. Superb!!&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; &lt;span style="font-style: italic;"&gt;if (attachFile.PostedFile != null &amp;amp;&amp;amp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;           attachFile.PostedFile.ContentLength &gt; 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          &lt;span style="color: rgb(51, 204, 0);"&gt;// attachFile.PostedFile.FileName contains &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;          // the full path of the file. We only want the file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;   // so we delimit it by forward slashes into an array&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          string[] tempFileName =  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;              attachFile.PostedFile.FileName.Split('\\');&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;         &lt;span style="color: rgb(51, 204, 0);"&gt;// attachFile.PostedFile exposes a System.IO.Stream&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;         // property named InputStream&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;         Attachment emailAttach = new Attachment(&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;             attachFile.PostedFile.InputStream,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;             tempFileName[tempFileName.Length - 1]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          email.Attachments.Add(emailAttach);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        }&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-style: italic;"&gt;attachFile &lt;/span&gt;is a FileUpload control and &lt;span style="font-style: italic;"&gt;email &lt;/span&gt;is a MailMessage class. :) You can read the whole solution &lt;a href="http://geeksnotnerds.com/flyswat/file-upload-and-email-attachments-asp-net"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Hatim&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/741138771118067810-2763958567239716219?l=technicalside.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalside.blogspot.com/feeds/2763958567239716219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=741138771118067810&amp;postID=2763958567239716219' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/741138771118067810/posts/default/2763958567239716219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/741138771118067810/posts/default/2763958567239716219'/><link rel='alternate' type='text/html' href='http://technicalside.blogspot.com/2008/04/aspnet-sending-mail-with-attachment.html' title='ASP.NET, Sending mail with attachment'/><author><name>Radius</name><uri>http://www.blogger.com/profile/16395614055057007613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/221/467124565_84253245cf_m.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-741138771118067810.post-6889413527460211157</id><published>2008-04-28T12:40:00.004+08:00</published><updated>2008-04-28T12:44:19.679+08:00</updated><title type='text'>Ebooks</title><content type='html'>I thought I share with you guys some ebook links as i stumbled upon while searching information regarding AJAX and XHTML.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://acinfo.unap.cl/fmedina/archivos/Libros/Computacion/135.For.Dummies.ebooks.Wiley.Publishing/"&gt;http://acinfo.unap.cl/fmedina/archivos/Libros/Computacion/135.For.Dummies.ebooks.Wiley.Publishing/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://hates.home.anadolu.edu.tr/books/?C=M;O=D"&gt;http://hates.home.anadolu.edu.tr/books/?C=M;O=D&lt;/a&gt;&lt;br /&gt;&lt;a href="http://seclab.pl/pdf/"&gt;http://seclab.pl/pdf/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;although the best place to look for AJAX and ASP.NET information would be at  &lt;a href="http://www.asp.net/"&gt;http://www.asp.net/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Knowledge is power... have fun reading!!!&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Rads78&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/741138771118067810-6889413527460211157?l=technicalside.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalside.blogspot.com/feeds/6889413527460211157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=741138771118067810&amp;postID=6889413527460211157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/741138771118067810/posts/default/6889413527460211157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/741138771118067810/posts/default/6889413527460211157'/><link rel='alternate' type='text/html' href='http://technicalside.blogspot.com/2008/04/ebooks.html' title='Ebooks'/><author><name>Radius</name><uri>http://www.blogger.com/profile/16395614055057007613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/221/467124565_84253245cf_m.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-741138771118067810.post-961666634160787899</id><published>2008-04-16T09:36:00.001+08:00</published><updated>2008-04-16T12:18:49.967+08:00</updated><title type='text'>Welcome....</title><content type='html'>Welcome to the technical side of me. As a technical manager cum programmer with several years of experience doing development, I have lots to share with you readers regarding development tips and tricks. Although this blog will be focusing most of the time on C# development, ASP.NET and .NET framework, I will as well include some information regarding Linux's system administration. But do not expect much from me on Linux's side as its not my cup of tea but still I enjoy working on it. Feel free to browse and comment on all of my posts and please excuse me if what i write here is wrong or the explanation is not as what its supposed to be. Please correct me if I do so and by the end of the day, I hope that this blog would be beneficial to me, you and all of the development community worldwide.&lt;br /&gt;&lt;br /&gt;By the end, what differs between programmers are not what they had programmed but how they programmed it.&lt;br /&gt;&lt;br /&gt;Regards from Malaysia (or anywhere around the world),&lt;br /&gt;Hatim&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/741138771118067810-961666634160787899?l=technicalside.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technicalside.blogspot.com/feeds/961666634160787899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=741138771118067810&amp;postID=961666634160787899' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/741138771118067810/posts/default/961666634160787899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/741138771118067810/posts/default/961666634160787899'/><link rel='alternate' type='text/html' href='http://technicalside.blogspot.com/2008/04/welcome.html' title='Welcome....'/><author><name>Radius</name><uri>http://www.blogger.com/profile/16395614055057007613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/221/467124565_84253245cf_m.jpg'/></author><thr:total>3</thr:total></entry></feed>
