Category: Dot Net Framework

Simple Data Access Class for Access database

Simple Data Access Class for Access database

After little time i have to wrote a simple data access layer for MS Access database, For Connection string I wrote a simple Util Class as using System; using System.Collections.Generic; using System.Linq; using System.Web;...

how to write a tab delimited text file using C#.net

how to write a tab delimited text file using C#.net

Use following Code StreamReader sr = new StreamReader(@”d:simpleTabDelimeterFile.txt”); StreamWriter outputFile = new StreamWriter(@”d:out.txt”); string strline = “”; string[] _values = null; while (!sr.EndOfStream) { strline = sr.ReadLine(); _values = strline.Split(‘t’); if( _values.Length == 3...

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)...

parameter passing to crystal report object

parameter passing to crystal report object

When you have to send parameter form asp.net code behind to crystal report then kindly used this syntex or statement to achieve the task for example  ReportObjectVariable.SetParameterValue(ParmeterName,value) for example if  rpt is my report...