.: Easy Soft Technologies :.

May 14, 2008

How To Send Email Message In .NET

Last day i see some question in one best forum for programming that want to know how to send an email using .NET.
I have some experience when i work in one dutch project (’ TennisSite ‘) by Wellfound and have a module for send an email for customer.

So i will explain it here, about how to send an email using .NET. We use System.Net.Mail namespace for this project.

Ok this is the code snippet for send an email using .NET

Dim strUserName As String = "" ‘Username for smtpclient
Dim strPassword As String = "" ‘user password for smtpclient
Dim strHostName As String = "" ’smtpaddress
Dim intPort As Integer = 25
Dim credentials As New System.Net.NetworkCredential(strUserName, strPassword)
Dim message As New MailMessage()
Dim emailClient As New SmtpClient(strHostName, intPort)

With message
       .From = New MailAddress(strUserName)
       .To.Add(txtSendTo.Text.Trim)
       .Subject = "Test Send Email"
       .Body = txtMessage.Text.Trim
       .IsBodyHtml = True
       .Attachments.Add(New Attachment("path of file")
       .Bcc.Add("email address")
       .CC.Add("email address")
End With

emailClient.Credentials = credentials

Try
        emailClient.Send(message)
Catch ex As Exception
        MsgBox(ex.Source & " : " & ex.Message, MsgBoxStyle.Exclamation, "Error Message")
Finally
        message = Nothing
        emailClient = Nothing
End Try

I hope this article will help you in your some application project for send an email in future.

Simple Application Using .NET Part I

On this article, i will share my knowladge about how to make a simple application "CRUD" (Create, Read, Update, Delete) in .NET. One days ago, i get a request from some one that want to learn about .NET application using ADO.NET

For this part i give a simple application that using MS Access as a database application. We using System.Data.OleDb namespace for this.

This is the code snippet for this simple application:

Try
    Using Conn As New OleDbConnection(connString)
            Conn.Open()
            Using sqlCommand As New OleDbCommand()
             With sqlCommand
                   .CommandType = CommandType.Text
                   .CommandText = _stringSQL
                   .Connection = Conn
                   .ExecuteNonQuery()
             End With
            End Using
    End Using
    Return True
Catch ex As Exception
    MsgBox(ex.Source & " : " & ex.Message, MsgBoxStyle.Exclamation, "Error Messages")
    Return False
End Try

This metode we use for execute the sql command that given in INSERT, UPDATE and DELETE command.
Then when we want to bind database field or READ from database, we use OleDbDataAdapter and fill it to DataTable

Try
     Using Conn As New OleDbConnection(connString)
             Using daResult As New OleDbDataAdapter(_stringSQL, Conn)
                     daResult.Fill(_dtResult)
             End Using
     End Using
Catch ex As Exception
     MsgBox(ex.Source & " : " & ex.Message, MsgBoxStyle.Exclamation, "Error Messages")
End Try

For detail you can download SimpleApplication source to learn more from there.
I hope this article can help everyone who want to learn .NET espesially in database application.

March 4, 2008

Good Bye For Netscape

Filed under: Software, Technologies

DetikNet, Tuesday (04/03/2008)

The old web browser, Netscape Navigator, has gone. This American Online (AOL) web browser will not be operating again after 1 March 2008.

This news is not an issue. This situation looks when there is a recommendation for the user to change their browser to Firefox or Flock, that same technology with Netscape Navigator.

If we see in around 1990, Netscape has been having 90 % users who build by Marc Andreessen in 1994. In this era, Netscape play the important action in internet.

Information from BBC, Tuesday (4/3/2008), Netscape Navigator will get their stopping with happen by there is more popular browser now, such as Firefox and Internet Explorer (IE) that have 80 % user. Firefox is first rival of IE make a sensation with their action with make their customer increase every time. Otherwise Flock will be the social web browser in implement web 2.0

The Netscape’s said their disappointment about their web browser. They said that they do not want to change to using Flock or Firefox. And they hope sometimes Netscape will be growing up again.

Good Bye Netscape….

February 25, 2008

Microsoft Visual Studio 2008 Overview

Filed under: Software, Technologies
 

Visual Studio 2008 Overview

Microsoft® Visual Studio® 2008 delivers on the Microsoft vision of smart client applications by enabling developers to rapidly create connected applications that deliver the highest quality, rich user experiences. With Visual Studio 2008, organizations will find it easier than ever before to capture and analyze information to help them make effective business decisions. Visual Studio 2008 enables organizations of every size to rapidly create more secure, manageable, and reliable applications that take advantage of Windows Vista™ and the 2007 Office system.

Visual Studio 2008 delivers key advances for developers in three primary pillars:

  • Rapid application development
  • Effective team collaboration
  • Break through user experiences

Visual Studio 2008 provides advanced development tools, debugging features, database functionality, and innovative features for quickly creating tomorrow’s cutting-edge applications across a variety of platforms.

Visual Studio 2008 includes enhancements such as visual designers for faster development with the .NET Framework 3.5, substantial improvements to Web development tools and language enhancements that speed development with all types of data. Visual Studio 2008 provides developers with all the tools and framework support required to create compelling, expressive, AJAX-enabled Web applications.

Developers will be able to take advantage of these rich client-side and server-side, frameworks to easily build client-centric Web applications that integrate with any back-end data provider, run within any modern browser, and have complete access to ASP.NET application services and the Microsoft platform.

Rapid Application Development
To help developers rapidly create modern software, Visual Studio 2008 delivers improved language and data features, such as Language Integrated Query (LINQ), that make it easier for individual programmers to build solutions that analyze and act on information.

Visual Studio 2008 also provides developers with the ability to target multiple versions of the .NET Framework from within the same development environment. Developers will be able to build applications that target the .NET Framework 2.0, 3.0 or 3.5, meaning that they can support a wide variety of projects in the same environment.

Break Through User Experience
Visual Studio 2008 offers developers new tools that speed creation of connected applications on the latest platforms including the Web, Windows Vista, Office 2007, SQL Server 2008, and Windows Server 2008. For the Web, ASP.NET AJAX and other new technologies will enable developers to quickly create a new generation of more efficient, interactive, and personalized Web experiences.

Effective Team Collaboration
Visual Studio 2008 delivers expanded and improved offerings that help improve collaboration in development teams, including tools that help integrate database professionals and graphic designers into the development process.

Use the Microsoft .NET Framework 3.5
The .NET Framework enables the rapid construction of connected applications that provide outstanding end-user experiences by providing the building blocks (pre-fabricated software) for solving common programming tasks. Connected applications built on the .NET Framework model business processes effectively and facilitate the integration of systems in heterogeneous environments.

Together Visual Studio and the .NET Framework reduce the need for common plumbing code, reducing development time and enabling developers to concentrate on solving business problems.

The .NET Framework 3.5 builds incrementally on the .NET Framework 3.0. Enhancements have been made to feature areas including the base class library, Windows Workflow Foundation, Windows Communication Foundation, Windows Presentation Foundation, and Windows CardSpace.

Visual Studio Express 2008

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com