<?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-21427516</id><updated>2011-05-17T04:14:09.023+07:00</updated><title type='text'>Mastering .Net Programming</title><subtitle type='html'>This website describes about Microsoft .Net Programming Tips and Tricks.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Evaguide.com</name><uri>http://www.blogger.com/profile/11562475698286764228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-21427516.post-2312637182632465780</id><published>2007-06-22T22:43:00.000+07:00</published><updated>2007-06-22T23:01:20.467+07:00</updated><title type='text'>Using Cross Control Thread in .Net 2.0</title><content type='html'>This article discuss about the using of Thread in .Net 2.0. In the previous framework (.Net 1.1), it is easy to create a thread cross between control or class. But we can not use the same method for .Net 2.0. We should use a callback that delegate enables asynchronous calls to cross thread control.&lt;br /&gt;&lt;br /&gt;First step, we define the thread.&lt;br /&gt;&lt;br /&gt;   'define thread for translation&lt;br /&gt;   Private threadTranslation As System.Threading.Thread&lt;br /&gt;&lt;br /&gt;Second step, we call a ThreadTranslation function to start the process.&lt;br /&gt;&lt;br /&gt;           'create a process thread, then start translation&lt;br /&gt;           If IsNothing(threadTranslation) OrElse Not threadTranslation.IsAlive Then&lt;br /&gt;               threadTranslation = New System.Threading.Thread(AddressOf ThreadTranslation)&lt;br /&gt;               threadTranslation.Start()&lt;br /&gt;           End If&lt;br /&gt;&lt;br /&gt;The first and second step are same with the .Net 1.1. procedures.&lt;br /&gt;&lt;br /&gt;The next third step is different, we add a delegate function as a callback. The public function will invoke the callback function if the caller from different thread.&lt;br /&gt;&lt;br /&gt;   ' This delegate enables asynchronous calls to cross thread control&lt;br /&gt;   Delegate Function GetDictionaryTextCallback() As String&lt;br /&gt;&lt;br /&gt;   Public Function GetDictionaryText() As String&lt;br /&gt;       Dim strText As String = ""&lt;br /&gt;       Try&lt;br /&gt;           ' InvokeRequired required compares the thread ID of the&lt;br /&gt;           ' calling thread to the thread ID of the creating thread.&lt;br /&gt;           ' If these threads are different, it returns true.&lt;br /&gt;           If txtDictionary.InvokeRequired Then&lt;br /&gt;               Dim d As New GetDictionaryTextCallback(AddressOf GetDictionaryText)&lt;br /&gt;               strText = Me.Invoke(d, New Object() {})&lt;br /&gt;           Else&lt;br /&gt;               strText = txtDictionary.Text&lt;br /&gt;           End If&lt;br /&gt;           Return strText&lt;br /&gt;       Catch ex As Exception&lt;br /&gt;           Throw ex&lt;br /&gt;       End Try&lt;br /&gt;   End Function&lt;br /&gt;&lt;br /&gt;The ThreadTranslation function will call GetDictionaryText function from different thread. The GetDictionaryText will invoke the callback function.&lt;br /&gt;The result will be successfully written into textbox in the different thread.&lt;br /&gt;&lt;br /&gt;I use this method in my &lt;a href="http://bahasapro.blogspot.com/"&gt;Bahasa Professional&lt;/a&gt; project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-2312637182632465780?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/2312637182632465780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=2312637182632465780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/2312637182632465780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/2312637182632465780'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2007/06/using-cross-control-thread-in-net-20.html' title='Using Cross Control Thread in .Net 2.0'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-114015541727741384</id><published>2006-02-17T12:44:00.000+07:00</published><updated>2006-02-17T12:53:45.836+07:00</updated><title type='text'>How to check Internet Connection using .Net</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;In this article I want to describe how to check Internet Connection using .Net.&lt;br /&gt;We use an API function to check the connection; InternetGetConnectionState.&lt;br /&gt;&lt;br /&gt;The function source code is described below:&lt;br /&gt;&lt;br /&gt;Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Int32, _&lt;br /&gt;ByVal dwReserved As Int32) As Boolean&lt;br /&gt;&lt;br /&gt;Public Function IsConnectionAvailable() As Boolean&lt;br /&gt;   Dim lngFlags As Long&lt;br /&gt;   Try&lt;br /&gt;      'Return True if connection is available&lt;br /&gt;      IsConnectionAvailable = InternetGetConnectedState(lngFlags, 0)&lt;br /&gt;   Catch ex As Exception&lt;br /&gt;      Throw ex&lt;br /&gt;   End Try&lt;br /&gt;End Function &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-114015541727741384?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/114015541727741384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=114015541727741384' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/114015541727741384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/114015541727741384'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/02/how-to-check-internet-connection-using.html' title='How to check Internet Connection using .Net'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-113973658599730849</id><published>2006-02-12T16:20:00.000+07:00</published><updated>2006-02-12T16:32:33.426+07:00</updated><title type='text'>WebDAV for .Net Sample Application</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;This is a sample to send email using WebDAV protocol:&lt;br /&gt;&lt;br /&gt;'define public variables&lt;br /&gt;Private strUsername As String&lt;br /&gt;Private strPassword As String&lt;br /&gt;Private strAddress As String&lt;br /&gt;Private strServer As String&lt;br /&gt;Private strDomain As String&lt;br /&gt;Private strMailboxURI As String&lt;br /&gt;&lt;br /&gt;&lt;webmethod()&gt;Public Sub SendEmail(ByVal strTo As String, ByVal strSubject As String, ByVal strBody As String)&lt;br /&gt;&lt;br /&gt;'Variables.&lt;br /&gt;Dim PUTRequest As System.Net.HttpWebRequest&lt;br /&gt;Dim PUTResponse As System.Net.HttpWebResponse&lt;br /&gt;Dim MOVERequest As System.Net.HttpWebRequest&lt;br /&gt;Dim MOVEResponse As System.Net.HttpWebResponse&lt;br /&gt;Dim strMailboxURI As String&lt;br /&gt;Dim strSubURI As String&lt;br /&gt;Dim strTempURI As String&lt;br /&gt;Dim PUTRequestStream As System.IO.Stream&lt;br /&gt;Dim bytes() As Byte&lt;br /&gt;Try&lt;br /&gt;' Build the mailbox URI.&lt;br /&gt;strMailboxURI = "http://" &amp; strServer &amp;amp; "/exchange/" &amp; strAddress&lt;br /&gt;' Build the submission URI for the message. If Secure&lt;br /&gt;' Sockets Layer (SSL) is set up on the server, use&lt;br /&gt;' "https://" instead of "http://".&lt;br /&gt;strSubURI = strMailboxURI &amp;amp; "/##DavMailSubmissionURI##/"&lt;br /&gt;' Build the temporary URI for the message. If SSL is set&lt;br /&gt;' up on the server, use "https://" instead of "http://".&lt;br /&gt;strTempURI = strMailboxURI &amp; "/drafts/" &amp;amp; strSubject &amp; ".eml"&lt;br /&gt;' Construct the RFC 822 formatted body of the PUT request.&lt;br /&gt;' Note: If the From: header is included here,&lt;br /&gt;' the MOVE method request will return a&lt;br /&gt;' 403 (Forbidden) status. The From address will&lt;br /&gt;' be generated by the Exchange server.&lt;br /&gt;strBody = "To: " &amp;amp; strTo &amp; vbNewLine &amp;amp; _&lt;br /&gt;"Subject: " &amp; strSubject &amp;amp;amp;amp; vbNewLine &amp; _&lt;br /&gt;"Date: " &amp;amp; System.DateTime.Now &amp; _&lt;br /&gt;"X-Mailer: test mailer" &amp;amp; vbNewLine &amp; _&lt;br /&gt;"MIME-Version: 1.0" &amp;amp;amp;amp; vbNewLine &amp; _&lt;br /&gt;"Content-Type: text/plain;" &amp; vbNewLine &amp;amp; _&lt;br /&gt;"Charset = ""iso-8859-1""" &amp; vbNewLine &amp;amp; _&lt;br /&gt;"Content-Transfer-Encoding: 7bit" &amp; vbNewLine &amp;amp; _&lt;br /&gt;vbNewLine &amp; strBody&lt;br /&gt;' Create the PUT HttpWebRequest object.&lt;br /&gt;PUTRequest = CType(System.Net.WebRequest.Create(strTempURI), _&lt;br /&gt;System.Net.HttpWebRequest)&lt;br /&gt;' Create a new CredentialCache object and fill it with the network&lt;br /&gt;' credentials required to access the server.&lt;br /&gt;' Add the network credentials to the request.&lt;br /&gt;Dim myCredential As System.Net.NetworkCredential = New System.Net.NetworkCredential(strUsername, strPassword, strDomain)&lt;br /&gt;PUTRequest.Credentials = myCredential&lt;br /&gt;' Specify the PUT method.&lt;br /&gt;PUTRequest.Method = "PUT"&lt;br /&gt;' Encode the body using UTF-8.&lt;br /&gt;bytes = System.Text.Encoding.UTF8.GetBytes(strBody)&lt;br /&gt;' Set the content header length. This must be&lt;br /&gt;' done before writing data to the request stream.&lt;br /&gt;PUTRequest.ContentLength = bytes.Length&lt;br /&gt;' Get a reference to the request stream.&lt;br /&gt;PUTRequestStream = PUTRequest.GetRequestStream()&lt;br /&gt;' Write the message body to the request stream.&lt;br /&gt;PUTRequestStream.Write(bytes, 0, bytes.Length)&lt;br /&gt;' Close the Stream object to release the connection&lt;br /&gt;' for further use.&lt;br /&gt;PUTRequestStream.Close()&lt;br /&gt;' Set the Content-Type header to the RFC 822 message format.&lt;br /&gt;PUTRequest.ContentType = "message/rfc822"&lt;br /&gt;' PUT the message in the Drafts folder of the&lt;br /&gt;' sender's mailbox.&lt;br /&gt;PUTResponse = CType(PUTRequest.GetResponse(), System.Net.HttpWebResponse)&lt;br /&gt;'Console.WriteLine("Message successfully PUT to " &amp;amp; strTempURI)&lt;br /&gt;' Create the MOVE HttpWebRequest object.&lt;br /&gt;MOVERequest = CType(System.Net.WebRequest.Create(strTempURI), _&lt;br /&gt;System.Net.HttpWebRequest)&lt;br /&gt;' Add the network credentials to the request.&lt;br /&gt;MOVERequest.Credentials = myCredential&lt;br /&gt;' Specify the MOVE method.&lt;br /&gt;MOVERequest.Method = "MOVE"&lt;br /&gt;' Set the Destination header to the&lt;br /&gt;' mail submission URI.&lt;br /&gt;MOVERequest.Headers.Add("Destination", strSubURI)&lt;br /&gt;' Send the message by moving it from the Drafts folder of the&lt;br /&gt;' sender's mailbox to the mail submission URI.&lt;br /&gt;MOVEResponse = CType(MOVERequest.GetResponse(), System.Net.HttpWebResponse)&lt;br /&gt;'Console.WriteLine("Message successfully sent to " &amp;amp; strTo)&lt;br /&gt;' Clean up.&lt;br /&gt;PUTResponse.Close()&lt;br /&gt;MOVEResponse.Close()&lt;br /&gt;Catch ex As Exception&lt;br /&gt;Console.WriteLine(ex.Message)&lt;br /&gt;End Try&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-113973658599730849?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/113973658599730849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=113973658599730849' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113973658599730849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113973658599730849'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/02/webdav-for-net-sample-application.html' title='WebDAV for .Net Sample Application'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-113962487497231068</id><published>2006-02-11T09:18:00.000+07:00</published><updated>2006-02-11T09:27:55.133+07:00</updated><title type='text'>Sending Email in .Net using WebDAV</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Items in the Exchange store can be accessed remotely by using the WebDAV protocol, defined in RFC 2518. This protocol extends the HTTP 1.1 protocol, defined by RFC 2616, to provide additional methods and capabilities. It provides a means to access both the contents of an item and an extensible set of associated properties. Some of the methods defined by the protocol are the &lt;/span&gt;&lt;a href="mk:@MSITStore:C:/Program%20Files/Exchange%20SDK/SDK/docs/e2k3.chm::/e2k3/_webdav_move.htm"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;MOVE Method&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;, the &lt;/span&gt;&lt;a href="mk:@MSITStore:C:/Program%20Files/Exchange%20SDK/SDK/docs/e2k3.chm::/e2k3/_webdav_copy.htm"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;COPY Method&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;, the &lt;/span&gt;&lt;a href="mk:@MSITStore:C:/Program%20Files/Exchange%20SDK/SDK/docs/e2k3.chm::/e2k3/_webdav_delete.htm"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;DELETE Method&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;, and the &lt;/span&gt;&lt;a href="mk:@MSITStore:C:/Program%20Files/Exchange%20SDK/SDK/docs/e2k3.chm::/e2k3/_webdav_mkcol.htm"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;MKCOL Method&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;. The encoding format used to transfer item properties across the network is XML, defined in the World Wide Web Consortium (W3C) Recommendation REC-xml-20001006.&lt;br /&gt;When a URL in the Exchange store is entered in a Web browser, an XML formatted WebDAV protocol request is created and sent to the Microsoft® Exchange Server computer. When the server receives the request, it verifies the credentials of the client and automatically parses the XML for the requested data. The server then builds an XML WebDAV protocol response containing the appropriate properties and their values and sends the response back to the client. If the Web browser is able to parse XML, an XSL style sheet can be applied to the XML response and the data will be displayed in the browser. If the Web browser cannot parse XML, the information is displayed in HTML.&lt;br /&gt;&lt;br /&gt;The following illustration shows how a client browser interacts with the Exchange store using WebDAV.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://photos1.blogger.com/blogger/2408/1988/1600/webdav.0.jpg"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/2408/1988/320/webdav.0.jpg" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Microsoft Internet Explorer 5 and later provide the Microsoft XML (MSXML) Component Object Model (COM) component, a powerful XML parser and set of related tools. The XMLHTTPRequest COM class integrates with MSXML COM objects to simplify the management of client-side HTTP protocol requests and responses that contain XML bodies. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The transformational capabilities of the MSXML component can easily cast the response XML data into HTML, which can then be displayed by the browser.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-113962487497231068?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/113962487497231068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=113962487497231068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113962487497231068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113962487497231068'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/02/sending-email-in-net-using-webdav.html' title='Sending Email in .Net using WebDAV'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-113953522575397385</id><published>2006-02-10T08:15:00.000+07:00</published><updated>2006-03-04T22:47:13.836+07:00</updated><title type='text'>CDO.Net Sample Application</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;This is a sample for Sending Email using CDO.Net. Don't forget to add the reference to Microsoft CDO for Exchange Library.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'set constants&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Public Const cdoLow = 0&lt;br /&gt;Public Const cdoNormal = 1&lt;br /&gt;Public Const cdoHigh = 2&lt;br /&gt;Public Const cdoSendUsingPort = 2&lt;br /&gt;Public Const cdoSendUsingExchange = 3&lt;br /&gt;Public Const cdoImportance = "urn:schemas:httpmail:importance"&lt;br /&gt;Public Const cdoSendUsingMethod = _&lt;br /&gt;"http://schemas.microsoft.com/cdo/ configuration/sendusing"&lt;br /&gt;Public Const cdoSMTPServer = _&lt;br /&gt;"http://schemas.microsoft.com/cdo/ configuration/smtpserver"&lt;br /&gt;Public Const cdoSMTPServerPort = _&lt;br /&gt;"http://schemas.microsoft.com/cdo/ configuration/smtpserverport"&lt;br /&gt;Public Const cdoSMTPConnectionTimeout = _&lt;br /&gt;"http://schemas.microsoft.com/cdo/ configuration/smtpconnectiontimeout"&lt;br /&gt;Public Const cdoSMTPAuthenticate = _&lt;br /&gt;"http://schemas.microsoft.com/cdo/ configuration/smtpauthenticate"&lt;br /&gt;Public Const cdoBasic = 1&lt;br /&gt;Public Const cdoSendUserName = _&lt;br /&gt;"http://schemas.microsoft.com/cdo/ configuration/sendusername"&lt;br /&gt;Public Const cdoSendPassword = _&lt;br /&gt;"http://schemas.microsoft.com/cdo/ configuration/sendpassword"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Dim objConfig As CDO.Configuration&lt;br /&gt;Dim oFields As ADODB.Fields&lt;br /&gt;Dim oField As ADODB.Field&lt;br /&gt;Dim objMessage As CDO.Message&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'---------------- SETUP CONNECTION --------------&lt;br /&gt;'Setup configuration to connect to Exchange Server using SMTP&lt;br /&gt;objConfig = New CDO.Configuration&lt;br /&gt;oFields = objConfig.Fields&lt;br /&gt;' Set config fields we care about&lt;br /&gt;oField = oFields(cdoSendUsingMethod)&lt;br /&gt;oField.Value = cdoSendUsingPort&lt;br /&gt;'Change to read web.config SmptServer section&lt;br /&gt;oField = oFields(cdoSMTPServer)&lt;br /&gt;oField.Value = ConfigurationSettings.AppSettings("EmailServer")&lt;br /&gt;'set SMTP port&lt;br /&gt;oField = oFields(cdoSMTPServerPort)&lt;br /&gt;oField.Value = 25&lt;br /&gt;'set connection timeout&lt;br /&gt;oField = oFields(cdoSMTPConnectionTimeout)&lt;br /&gt;oField.Value = ConfigurationSettings.AppSettings("ConnectionTimeOut")&lt;br /&gt;'set smtp autenthication&lt;br /&gt;oField = oFields(cdoSMTPAuthenticate)&lt;br /&gt;oField.Value = cdoBasic&lt;br /&gt;'set username&lt;br /&gt;oField = oFields(cdoSendUserName)&lt;br /&gt;oField.Value = ConfigurationSettings.AppSettings("DomainName") &amp; "\" &amp;amp; strUserId&lt;br /&gt;'set password&lt;br /&gt;oField = oFields(cdoSendPassword)&lt;br /&gt;oField.Value = strPassword&lt;br /&gt;oFields.Update()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'-------------- CREATE CDO Message Object -----------&lt;br /&gt;objMessage = CreateObject("CDO.Message")&lt;br /&gt;objMessage.Configuration = objConfig&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'set the sender&lt;br /&gt;objMessage.From = strEmail&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'set destination&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;objMessage.To = strEmailTo&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'set carbon copy&lt;br /&gt;objMessage.CC = strEmailCC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'set blank carbon copy&lt;br /&gt;objMessage.BCC = strEmailBCC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'set the subject&lt;br /&gt;objMessage.Subject = strSubject&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'set the message body&lt;br /&gt;objMessage.TextBody = strBody&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'add attachment&lt;br /&gt;objMessage.AddAttachment(strFilePath)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'set the message importance&lt;br /&gt;objMessage.Fields(cdoImportance).Value = cdoHigh&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'save the message&lt;br /&gt;objMessage.Fields.Update()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;'send the message&lt;br /&gt;objMessage.Send()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-113953522575397385?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/113953522575397385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=113953522575397385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113953522575397385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113953522575397385'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/02/cdonet-sample-application.html' title='CDO.Net Sample Application'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-113953405635024954</id><published>2006-02-10T08:04:00.000+07:00</published><updated>2006-02-10T08:14:16.660+07:00</updated><title type='text'>Sending Email in .Net using CDO</title><content type='html'>&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Collaboration Data Objects (CDO) is a server-side collaborative component that is used in conjunction with Microsoft® ActiveX® Data Objects (ADO) 2.5 and Active Directory® Service Interfaces (ADSI). You can use CDO to create Web collaboration solutions based on the Exchange store and Microsoft Active Directory® service in Microsoft Windows® server operating systems. Whereas OLE DB, ADO, and ADSI provide the fundamental data access mechanisms to the Exchange store and Active Directory, CDO provides extended collaborative functionality that includes the creation and management of the following:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Folders and non-folder items&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Messages&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Appointments&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Meeting request messages and responses (accept, accept tentative, decline)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Contacts&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Mailboxes, recipients, and the Exchange store folder hierarchies and settings&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Exchange store event-driven workflows that manage process-driven application&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;In Microsoft Exchange Server 2003, CDO is available only on the same computer (or cluster) as Exchange Server 2003 itself. In addition, CDO can access data only in a local Exchange Server 2003 public store or mailbox store. It cannot directly access data residing in different Exchange Server 2003 stores.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Note&lt;/strong&gt;  The CDO for Exchange Management (CDOEXM) component of CDO can be used from remote servers. You can install CDOEXM along with the Exchange Server 2003 Administration tools.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-113953405635024954?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/113953405635024954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=113953405635024954' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113953405635024954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113953405635024954'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/02/sending-email-in-net-using-cdo.html' title='Sending Email in .Net using CDO'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-113894639017790641</id><published>2006-02-03T12:28:00.000+07:00</published><updated>2006-03-04T22:48:59.873+07:00</updated><title type='text'>Creating Multiple Page in Web Form using IE Web Control</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;The Microsoft Internet Explorer WebControls are a collection of ASP.NET server controls that facilitate user interface (UI) authoring. The WebControls provide a single-source authoring solution in ASP.NET that delivers HTML content based on a browser's capabilities.&lt;br /&gt;&lt;br /&gt;When authoring with the WebControls elements and objects in ASP.NET Web Forms, pages are generated that render and function correctly in all commonly used browsers, providing widespread reach to a diverse browsing audience. The ASP.NET server controls detect the browser type and automatically take advantage of many of the advanced capabilities in Internet Explorer 5.5 and later versions.&lt;br /&gt;&lt;br /&gt;The WebControls include a set of Dynamic HTML (DHTML) behaviors, which are downloaded automatically from ASP.NET Web Forms to Internet Explorer 5.5 and later versions. These behaviors implement custom elements that can also be used independently of ASP.NET.&lt;br /&gt;&lt;br /&gt;To create multiple page in a webform you must download the IE Web Controls component:&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.asp.net/IEWebControls/Download.aspx?tabindex=0&amp;tabid=1"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;http://www.asp.net/IEWebControls/Download.aspx?tabindex=0&amp;amp;tabid=1&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;Run the setup file and build to create the .dll file.&lt;br /&gt;Make sure you have \webctrl_client folder in your wwwroot directory. If don't exist, copy the directory to your wwwroot. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/2408/1988/1600/iewebcontrol.jpg"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/2408/1988/320/iewebcontrol.jpg" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Open your Microsoft Visual Studio and add MultiPage and TabStrip component to the Toolbox after successfull installation. You can also add the .dll to \bin directory in your project.&lt;br /&gt;&lt;br /&gt;For Visual Studio 2005 installation you must copy \webctrl_client folder into your project folder to enable the Tab Strip. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Then add some lines in your web.config file (after &amp;lt;configuration&amp;gt; &lt;configuration&gt;tag):&lt;br /&gt;&lt;configsections&gt;&lt;br /&gt;&lt;section name="MicrosoftWebControls" type="System.Configuration.NameValueSectionHandler,System,Version=2.0.0.0,                     Culture=neutral, PublicKeyToken=B77A5C561934E089"&gt;&amp;lt;configSections&amp;gt;&lt;br /&gt;&amp;lt;section name="MicrosoftWebControls"&lt;br /&gt;type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0,&lt;br /&gt;Culture=neutral, PublicKeyToken=B77A5C561934E089"/&amp;gt;&lt;br /&gt;&amp;lt;/configSections&amp;gt;&lt;br /&gt;&amp;lt;MicrosoftWebControls&amp;gt; &amp;lt;add key="CommonFiles"&lt;br /&gt;value="/yourwebsitename/webctrl_client/1_0/"/&amp;gt;&lt;br /&gt;&amp;lt;/MicrosoftWebControls&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://photos1.blogger.com/blogger/2408/1988/1600/multipage.jpg"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/2408/1988/320/multipage.jpg" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Both component, MultiPage and TabStrip, are only editable from the html view and can not editable from the designer.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-113894639017790641?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/113894639017790641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=113894639017790641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113894639017790641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113894639017790641'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/02/creating-multiple-page-in-web-form.html' title='Creating Multiple Page in Web Form using IE Web Control'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-113877934806806997</id><published>2006-02-01T14:29:00.000+07:00</published><updated>2006-02-01T14:35:48.080+07:00</updated><title type='text'>Designing Distributed System using VS.Net 2005 Team System</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;The Distributed System Designers are tools that support the graphical design and validation of distributed systems. This toolset includes tools for application architects, designers, developers and operations architects. The Distributed System Designers are an early deliverable from the Dynamic Systems Initiative (DSI), aimed at improving the development, deployment and management of enterprise-class distributed systems.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The Distributed System Designers provide an integrated design experience with the goal of enabling the visual design and validation of distributed systems. Designers use the System Definition Model (SDM) as the underlying meta-model that describes connectivity, configuration and relationships not only for the application services, but also for the run-time environments. SDM is based on a multi-layered model that includes applications, application hosting environments, network topology, operating systems, and physical devices. This model allows the Distributed System Designers to not only describe designs at each layer, but also to express constraints and policies at each layer that can cut across all layers of a distributed system.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The Distributed System Designers support an integrated model of two domains—development and operations. This allows the designers to address customer problems in the following ways:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Provides a common language (based on SDM) for describing the design and configuration of a distributed system.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Allows developers to express what the application requires of the run-time environment.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Allows operations to express application runtime, security, and connectivity requirements that are the policies of the target deployment environment.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Uses abstractions that allow developers and operations to communicate on common ground.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Integrates with the existing Visual Studio project system and .NET technologies.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Provides full synchronization between visual design elements and code.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Includes an extensibility framework to allow new kinds of application and hosting systems to be modeled.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The following section elaborates on the capabilities of the individual designers and editors in the Distributed System Designers toolset.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The Distributed System Designers include the following designers:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Application Connection Designer&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Logical Datacenter Designer&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;System Designer&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Deployment Designer&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;We will discuss these designers in the other threads.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-113877934806806997?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/113877934806806997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=113877934806806997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113877934806806997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113877934806806997'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/01/designing-distributed-system-using.html' title='Designing Distributed System using VS.Net 2005 Team System'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-113875880244303421</id><published>2006-02-01T08:49:00.000+07:00</published><updated>2006-02-01T08:53:22.450+07:00</updated><title type='text'>Visual Studio 2005 Templates</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Visual Studio project and item templates provide reusable and customizable project and item stubs that accelerate the development process, removing the need to create new projects and items from scratch.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;A number of predefined project and item templates are installed when you install Visual Studio. For example, the Visual Basic, Visual C#, and Visual J# Windows Appliation and Class Library templates available in the New Project dialog box are all examples project templates. Installed item templates are available from the Add New Item dialog box, and include items such as XML files, HTML pages, and Style Sheets.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;These templates provide a starting point for users to begin creating new projects or expanding current projects. Project templates provide the basic files needed for a particular project type, include standard assembly references, and set default project properties and compiler options. Item templates can range in complexity from a single empty file with the correct file extension to a multi-file item containing items such as source code files with stub code, designer information files, and embedded resources.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;In addition to the installed templates available in the New Project and Add New Item dialog boxes, you can author your own templates or download and use templates created by the community.&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;All project and item templates, whether installed with Visual Studio or created by you, function with the same principles and consist of the same contents. All templates contain the following items:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The files to create when the template is used. This includes all source code files, embedded resources, project files, etc.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;One .vstemplate file. This file contains the metadata that provides Visual Studio with the information it needs to display the template in the New Project and Add New Item dialog boxes and create a project or item from the template.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;When these files are compressed into a .zip file and placed in the proper folder, Visual Studio automatically displays them in the My Templates section of the New Project and Add New Item dialog boxes. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-113875880244303421?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/113875880244303421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=113875880244303421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113875880244303421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113875880244303421'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/01/visual-studio-2005-templates.html' title='Visual Studio 2005 Templates'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-113871316505362926</id><published>2006-01-31T20:01:00.000+07:00</published><updated>2006-01-31T20:36:26.070+07:00</updated><title type='text'>Display a Windows Form without Recreate the Object</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;This is a simple code to check whether a form is already created or not.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;First, if the Form is nothing then we always create the object.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Second, if the form is ever created but already disposed. The objForm contains a reference but the objForm.Created is false. We also create the object.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Otherwise, we only show and activate the form without recreate the object if the form is already created.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Private objForm as myFormName&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Private Sub DisplayForm()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;If IsNothing(objForm) OrElse Not (objForm.Created) Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;objForm= New myFormName&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;objForm.Show()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;objForm.Activate()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-113871316505362926?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/113871316505362926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=113871316505362926' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113871316505362926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113871316505362926'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/01/display-windows-form-without-recreate.html' title='Display a Windows Form without Recreate the Object'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-113870938879717756</id><published>2006-01-31T18:50:00.000+07:00</published><updated>2006-01-31T20:34:52.273+07:00</updated><title type='text'>Create ASP.Net Page Title in Web Browser</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;I want to introduce you how to create page Title in your web browser. I create the title first time using Visual Studio .Net 2003. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;The steps are described below: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;1. Add id and runat server at your asp page.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;title id="PageTitle" runat="server"&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;2. Add a HtmlGenericControl object in your code-behind.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Protected PageTitle As HtmlGenericControl&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;3. Set the innertext for the PageTitle object in your code-behind.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PageTitle.InnerText = "This is a new title"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;These three steps will set your web browser title to a new title.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Now I migrate my application to Microsoft .Net 2.0.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Using Microsoft .Net 2.0, the steps can be written in one line:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Page.Title = "This is a new title"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The line above is a new feature in Microsoft .Net 2.0. I create my application using Visual Studio .Net 2005. This is only one enhancement in this version.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-113870938879717756?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/113870938879717756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=113870938879717756' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113870938879717756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113870938879717756'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/01/create-aspnet-page-title-in-web.html' title='Create ASP.Net Page Title in Web Browser'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-21427516.post-113842025221235502</id><published>2006-01-28T10:38:00.000+07:00</published><updated>2006-01-31T20:19:52.126+07:00</updated><title type='text'>New Visual Studio.Net 2005 Application Folders</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;ASP.NET recognizes certain folder names that you can use for specific types of content. The table below lists the reserved folder names and the type of files that the folders typically contain.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;The content of application folders, except for the App_Themes folder, is not served in response to Web requests, but it can be accessed from application code.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;1. &lt;strong&gt;App_Browsers&lt;/strong&gt; : Contains browser definitions (.browser files) that ASP.NET uses to identify individual browsers and determine their capabilities.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;2. &lt;strong&gt;App_Code&lt;/strong&gt; : Contains source code for utility classes and business objects (for example, .cs, .vb, and .jsl files) that you want to compile as part of your application. In a dynamically compiled application, ASP.NET compiles the code in the App_Code folder on the initial request to your application. Items in this folder are then recompiled when any changes are detected.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;3. &lt;strong&gt;App_Data&lt;/strong&gt; : Contains application data files including MDF files, XML files, as well as other data store files. The App_Data folder is used by ASP.NET 2.0 to store an application's local database, which can be used for maintaining membership and role information.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;4. &lt;strong&gt;App_GlobalResources&lt;/strong&gt; : Contains resources (.resx and .resources files) that are compiled into assemblies with global scope. Resources in the App_GlobalResources folder are strongly typed and can be accessed programmatically.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;5. &lt;strong&gt;App_LocalResources&lt;/strong&gt; : Contains resources (.resx and .resources files) that are associated with a specific page, user control, or master page in an application.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;6. &lt;strong&gt;App_Themes&lt;/strong&gt; : Contains a collection of files (.skin and .css files, as well as image files and generic resources) that define the appearance of ASP.NET Web pages and controls.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;7. &lt;strong&gt;App_WebReferences&lt;/strong&gt; : Contains reference contract files (.wsdl files), schemas (.xsd files), and discovery document files (.disco and .discomap files) defining a Web reference for use in an application.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;8. &lt;strong&gt;Bin&lt;/strong&gt; : Contains compiled assemblies (.dll files) for controls, components, or other code that you want to reference in your application. Any classes represented by code in the Bin folder are automatically referenced in your application.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Configuration settings for your site are managed in a Web.config file that is located in the site's root folder. If you have files in subfolders, you can maintain separate configuration settings for those files by creating a Web.config file in that folder.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21427516-113842025221235502?l=dotnetmaster.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetmaster.blogspot.com/feeds/113842025221235502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=21427516&amp;postID=113842025221235502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113842025221235502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/21427516/posts/default/113842025221235502'/><link rel='alternate' type='text/html' href='http://dotnetmaster.blogspot.com/2006/01/new-visual-studionet-2005-application.html' title='New Visual Studio.Net 2005 Application Folders'/><author><name>Iman Budi Setiawan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_hg1QUg8_uH0/SfJxLK18ydI/AAAAAAAAAD8/CE06bwq3IcU/S220/imansmall.jpg'/></author><thr:total>0</thr:total></entry></feed>
