Friday, July 17, 2009

Subsonic 3.0 is out now- Next Generation Object Relational Mapper

There lots of ORM(Object Relational Mapper) is available now like entity framework,nhibernate, linq, dlinq but i choose subsonic 3.0 for my next application which will be a question answer site for the following reason

  1. Now subsonic 3.0 is with linq support so you can write your lambda expression and linq queries along with the subsonic
  2. It comes with simple repository.
  3. Built in T4 Templates for 4.0
  4. Linq to subsonic.
  5. Subsonic 3.0 templates.
  6. Can handle thousand of queries at a times.
  7. Full support with asp.net 3.5 features.
  8. Ease of Use.
  9. Great support with asp.net mvc

And another great news is that Rob Conery is hired by the Microsoft and subsonic will official ORM for ASP.net Applications.

You can download subsonic 3.0 from here.

http://www.subsonicproject.com/Download

Happy Coding..

Share:

Photoshop and CSS Tutorials.

I am creating a web template for my forthcoming question answer asp.net mvc site. I need a web 2.0 rich template for my site for that i have search on web and found some great photoshop and css links. Here is collection for that.

Photoshop link:

  1. First is the my link who created design for my blog. http://psdvibe.com/- Its a great resource to learn Photoshop and create professional template. Thanks you for giving me the best template free of charge.
  2. http://www.webdesignbooth.com/32-useful-portable-apps-for-web-designers-and-developers/
  3. http://hv-designs.co.uk- A Great Resource for Photoshop design
  4. http://creativenerds.co.uk/tutorials/70-tutorials-using-photoshop-to-design-a-website/
  5. http://pelfusion.com/
  6. http://bestdesignoptions.com/
  7. http://www.smashingmagazine.com/2009/07/15/clever-png-optimization-techniques/
  8. http://sixrevisions.com/tutorials/web-development-tutorials/coding-a-clean-illustrative-web-design-from-scratch/
  9. http://speckyboy.com/2009/07/06/40-free-and-essential-web-design-and-development-books-from-google/
  10. http://webdesignledger.com
  11. http://sixrevisions.com/
  12. http://photoshoptutorials.ws/
  13. http://www.tutorialized.com/tutorials/Photoshop/1
  14. http://www.absolutecross.com/tutorials/photoshop/
  15. http://www.photoshopsupport.com/tutorials.html

CSS Link:

  1. http://www.freecsstemplates.org/ One of the greatest tutorial i have seen for free.
  2. http://www.free-css-templates.com/
  3. http://www.free-css.com/
  4. http://www.csstemplatesforfree.com/
  5. http://www.westciv.com/style_master/house/
  6. http://www.w3.org/Style/CSS/learning
  7. http://www.jasonbartholme.com/101-css-resources-to-add-to-your-toolbelt-of-awesomeness/
  8. http://speckyboy.com
  9. http://designreviver.com
  10. http://thecssblog.com/tips-and-tricks/image-slicing-and-css-being-smart-with-file-formats/
  11. http://line25.com/articles/15-must-read-articles-for-css-beginners
  12. http://www.smashingmagazine.com/2009/06/25/35-css-lifesavers-for-efficient-web-design/
  13. http://designreviver.com/tips/13-training-principles-of-css-everyone-should-know/
  14. http://arbent.net/blog/40-outstanding-css-techniques-and-tutorials

Happy designing…

Share:
Thursday, July 16, 2009

Sending email through System.Net.Mail.Smtpmail in asp.net 3.5/2.0


For any web application or website the sending email is a necessity for newsletter, invitation or reset password for everything we have to sent a mail to the people. So we need to see how we can send mail. In 1.1 we are sending emails with System.Web.Mail.SmtpMail which is now obsolete. Now in asp.net 2.0 or higher version there is a namespace called System.Net.Mail.Smtpmail in asp.net 3.5. With this namespace we can easily write a code to send mail within couple of minutes.

If you want to sent a mail first thing you need is smtpserver. Smtpserver is a server which will route and send mail to particular system. To use smtpserver we need to configure some settings in web.config following is the setting for the web.config.

<system.net>

    <mailsettings>

       <smtp deliveryMethod="Network">

         <network host="stmp server address or ip"

           port="Smtp port" defaultCredentials="true"/>

        </smtp>     

    </mailsettings>

</system.net>


Here you need to set the all the smtp configuration. This will be used by the smptclient by default. Here is the code for sending email in asp.net 3.5

SmtpClient smtpClient = new SmtpClient();

MailMessage message = new MailMessage();

try

{

   MailAddress fromAddress = new MailAddress("[email protected]","Nameofsendingperson");

   message.From = fromAddress;//here you can set address

   message.To.Add("[email protected]");//here you can add multiple to

   message.Subject = "Feedback";//subject of email

   message.CC.Add("[email protected]");//ccing the same email to other email address

   message.Bcc.Add(new MailAddress("[email protected]"));//here you can add bcc address

   message.IsBodyHtml = false;//To determine email body is html or not

   message.Body =@"Plain or HTML Text";

   smtpClient.Send(message);

}

catch (Exception ex)

{

   //throw exception here you can write code to handle exception here

}


So from above simple code you can add send email to anybody
Adding Attachment to the email:If you want to attach some thing in the code then you need to write following code.

message.Attachments.Add(New System.Net.Mail.Attachment(Filename));


Here file name will the physical path along with the file name. You can attach multiple files with the mail.

Sending email with Authentication: If you want to sent a email with authentication then you have to write following code.

System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient();

     //This object stores the authentication values

     System.Net.NetworkCredential basicCrenntial = 
          new System.Net.NetworkCredential("username", "password");

     mailClient.Host = "Host";

     mailClient.UseDefaultCredentials = false;

     mailClient.Credentials = basicCrenntial;

     mailClient.Send(message);



Happy Coding…
Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews