Category: .net framework 2

how to send mail smtp with authentication with web.mail class

how to send mail smtp with authentication with web.mail class

hi i used following code MailMessage message = new MailMessage(); message.To = “myemailaccount@yahoo.com”; message.From = “myemailaccount@thecrystalrosary.com”; message.Subject = “Testing Internet SmtpMail”; message.BodyFormat = MailFormat.Html; message.Body = “body”; message.Fields.Add(“http://schemas.microsoft.com/cdo/configuration/smtpserver”, “smtp.thecrystalrosary.com”); message.Fields.Add(“http://schemas.microsoft.com/cdo/configuration/smtpserverport”, 25); message.Fields.Add(“http://schemas.microsoft.com/cdo/configuration/sendusing”, 2); //2...

How to resize image in .net

How to resize image in .net

use follwing Code change image path at load event method for downloading Code Imports System Imports System.Drawing Imports System.Drawing.Imaging Imports System.Drawing.Drawing2D Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)...

How to write word document in asp.net

How to write word document in asp.net

You can add follwing code at page level function and called in button or page load function Void GenerateWordDoc() { string strDocBody; try { strDocBody = “<html “ + “xmlns:o=’urn:schemas-microsoft-com:office:office’ “ + “xmlns:w=’urn:schemas-microsoft-com:office:word’” +...

How to get Ip of Url in c#

How to get Ip of Url in c#

Here is sample code  remember to add system.net namespace IPHostEntry ip = Dns.GetHostByName (“www.yahoo.com”); IPAddress [] IpA = ipE.AddressList; for (int i = 0; i < IpA.Length; i++) {     Console.WriteLine (“IP Address {0}: {1}...

how to upload larger files in asp.net 2

how to upload larger files in asp.net 2

by default asp.net application did not upload file more than 4.5 mb or 4 mb. For this purpose You have to add following http runtime tag in web.cofig of web site. <httpRuntime executionTimeout=“90“ maxRequestLength=“20096“useFullyQualifiedRedirectUrl=“false“...