<?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'><id>tag:blogger.com,1999:blog-3318849733884276677</id><updated>2009-12-18T04:29:58.750-08:00</updated><title type='text'>Happy Coding...!</title><subtitle type='html'>coding library of php code, .net code, java code....</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default?start-index=26&amp;max-results=25'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-2766671527851981125</id><published>2009-02-03T04:24:00.000-08:00</published><updated>2009-02-03T04:29:48.493-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio dot net'/><category scheme='http://www.blogger.com/atom/ns#' term='Send Data Using the WebRequest Class'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Tips'/><title type='text'>How to: Send Data Using the WebRequest Class</title><content type='html'>For C#,&lt;br /&gt;=======&lt;br /&gt;&lt;pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl49CSharp" space="preserve"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Net;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;namespace&lt;/span&gt; Examples.System.Net&lt;br /&gt;{&lt;br /&gt;  &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; WebRequestPostExample&lt;br /&gt;  {&lt;br /&gt;      &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Main ()&lt;br /&gt;      {&lt;br /&gt;          &lt;span style="color:green;"&gt;// Create a request using a URL that can receive a post. &lt;/span&gt;&lt;br /&gt;          WebRequest request = WebRequest.Create (&lt;span style="color:maroon;"&gt;&lt;span style="color:maroon;"&gt;"http://www.rushiraval.co.cc&lt;/span&gt;&lt;/span&gt;);&lt;br /&gt;          &lt;span style="color:green;"&gt;// Set the Method property of the request to POST.&lt;/span&gt;&lt;br /&gt;          request.Method = &lt;span style="color:maroon;"&gt;&lt;span style="color:maroon;"&gt;"POST"&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;          &lt;span style="color:green;"&gt;// Create POST data and convert it to a byte array.&lt;/span&gt;&lt;br /&gt;          &lt;span style="color:blue;"&gt;string&lt;/span&gt; postData = &lt;span style="color:maroon;"&gt;&lt;span style="color:maroon;"&gt;"This is a test that posts this string to a Web server."&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;          byte[] byteArray = Encoding.UTF8.GetBytes (postData);&lt;br /&gt;          &lt;span style="color:green;"&gt;// Set the ContentType property of the WebRequest.&lt;/span&gt;&lt;br /&gt;          request.ContentType = &lt;span style="color:maroon;"&gt;&lt;span style="color:maroon;"&gt;"application/x-www-form-urlencoded"&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;          &lt;span style="color:green;"&gt;// Set the ContentLength property of the WebRequest.&lt;/span&gt;&lt;br /&gt;          request.ContentLength = byteArray.Length;&lt;br /&gt;          &lt;span style="color:green;"&gt;// Get the request stream.&lt;/span&gt;&lt;br /&gt;          Stream dataStream = request.GetRequestStream ();&lt;br /&gt;          &lt;span style="color:green;"&gt;// Write the data to the request stream.&lt;/span&gt;&lt;br /&gt;          dataStream.Write (byteArray, 0, byteArray.Length);&lt;br /&gt;          &lt;span style="color:green;"&gt;// Close the Stream object.&lt;/span&gt;&lt;br /&gt;          dataStream.Close ();&lt;br /&gt;          &lt;span style="color:green;"&gt;// Get the response.&lt;/span&gt;&lt;br /&gt;          WebResponse response = request.GetResponse ();&lt;br /&gt;          &lt;span style="color:green;"&gt;// Display the status.&lt;/span&gt;&lt;br /&gt;          Console.WriteLine (((HttpWebResponse)response).StatusDescription);&lt;br /&gt;          &lt;span style="color:green;"&gt;// Get the stream containing content returned by the server.&lt;/span&gt;&lt;br /&gt;          dataStream = response.GetResponseStream ();&lt;br /&gt;          &lt;span style="color:green;"&gt;// Open the stream using a StreamReader for easy access.&lt;/span&gt;&lt;br /&gt;          StreamReader reader = &lt;span style="color:blue;"&gt;new&lt;/span&gt; StreamReader (dataStream);&lt;br /&gt;          &lt;span style="color:green;"&gt;// Read the content.&lt;/span&gt;&lt;br /&gt;          &lt;span style="color:blue;"&gt;string&lt;/span&gt; responseFromServer = reader.ReadToEnd ();&lt;br /&gt;          &lt;span style="color:green;"&gt;// Display the content.&lt;/span&gt;&lt;br /&gt;          Console.WriteLine (responseFromServer);&lt;br /&gt;          &lt;span style="color:green;"&gt;// Clean up the streams.&lt;/span&gt;&lt;br /&gt;          reader.Close ();&lt;br /&gt;          dataStream.Close ();&lt;br /&gt;          response.Close ();&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;For VB,&lt;br /&gt;==========&lt;br /&gt;&lt;span style="color:blue;"&gt;Imports&lt;/span&gt; System&lt;br /&gt;&lt;span style="color:blue;"&gt;Imports&lt;/span&gt; System.IO&lt;br /&gt;&lt;span style="color:blue;"&gt;Imports&lt;/span&gt; System.Net&lt;br /&gt;&lt;span style="color:blue;"&gt;Imports&lt;/span&gt; System.Text&lt;br /&gt;&lt;span style="color:blue;"&gt;Namespace&lt;/span&gt; Examples.System.Net&lt;br /&gt;  &lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; WebRequestPostExample&lt;br /&gt;&lt;br /&gt;      &lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Shared&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt; Main()&lt;br /&gt;          &lt;span style="color:green;"&gt;' Create a request using a URL that can receive a post. &lt;/span&gt;&lt;br /&gt;          &lt;span style="color:blue;"&gt;Dim&lt;/span&gt; request &lt;span style="color:blue;"&gt;As&lt;/span&gt; WebRequest = WebRequest.Create(&lt;span style="color:maroon;"&gt;"http://www.rushiraval.co.cc "&lt;/span&gt;)&lt;br /&gt;          &lt;span style="color:green;"&gt;' Set the Method property of the request to POST.&lt;/span&gt;&lt;br /&gt;          request.Method = &lt;span style="color:maroon;"&gt;"POST"&lt;/span&gt;&lt;br /&gt;          &lt;span style="color:green;"&gt;' Create POST data and convert it to a byte array.&lt;/span&gt;&lt;br /&gt;          &lt;span style="color:blue;"&gt;Dim&lt;/span&gt; postData &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt; = &lt;span style="color:maroon;"&gt;"This is a test that posts this string to a Web server."&lt;/span&gt;&lt;br /&gt;          &lt;span style="color:blue;"&gt;Dim&lt;/span&gt; byteArray &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;Byte&lt;/span&gt;() = Encoding.UTF8.GetBytes(postData)&lt;br /&gt;          &lt;span style="color:green;"&gt;' Set the ContentType property of the WebRequest.&lt;/span&gt;&lt;br /&gt;          request.ContentType = &lt;span style="color:maroon;"&gt;"application/x-www-form-urlencoded"&lt;/span&gt;&lt;br /&gt;          &lt;span style="color:green;"&gt;' Set the ContentLength property of the WebRequest.&lt;/span&gt;&lt;br /&gt;          request.ContentLength = byteArray.Length&lt;br /&gt;          &lt;span style="color:green;"&gt;' Get the request stream.&lt;/span&gt;&lt;br /&gt;          &lt;span style="color:blue;"&gt;Dim&lt;/span&gt; dataStream &lt;span style="color:blue;"&gt;As&lt;/span&gt; Stream = request.GetRequestStream()&lt;br /&gt;          &lt;span style="color:green;"&gt;' Write the data to the request stream.&lt;/span&gt;&lt;br /&gt;          dataStream.Write(byteArray, 0, byteArray.Length)&lt;br /&gt;          &lt;span style="color:green;"&gt;' Close the Stream object.&lt;/span&gt;&lt;br /&gt;          dataStream.Close()&lt;br /&gt;          &lt;span style="color:green;"&gt;' Get the response.&lt;/span&gt;&lt;br /&gt;          &lt;span style="color:blue;"&gt;Dim&lt;/span&gt; response &lt;span style="color:blue;"&gt;As&lt;/span&gt; WebResponse = request.GetResponse()&lt;br /&gt;          &lt;span style="color:green;"&gt;' Display the status.&lt;/span&gt;&lt;br /&gt;          Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)&lt;br /&gt;          &lt;span style="color:green;"&gt;' Get the stream containing content returned by the server.&lt;/span&gt;&lt;br /&gt;          dataStream = response.GetResponseStream()&lt;br /&gt;          &lt;span style="color:green;"&gt;' Open the stream using a StreamReader for easy access.&lt;/span&gt;&lt;br /&gt;          &lt;span style="color:blue;"&gt;Dim&lt;/span&gt; reader &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; StreamReader(dataStream)&lt;br /&gt;          &lt;span style="color:green;"&gt;' Read the content.&lt;/span&gt;&lt;br /&gt;          &lt;span style="color:blue;"&gt;Dim&lt;/span&gt; responseFromServer &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt; = reader.ReadToEnd()&lt;br /&gt;          &lt;span style="color:green;"&gt;' Display the content.&lt;/span&gt;&lt;br /&gt;          Console.WriteLine(responseFromServer)&lt;br /&gt;          &lt;span style="color:green;"&gt;' Clean up the streams.&lt;/span&gt;&lt;br /&gt;          reader.Close()&lt;br /&gt;          dataStream.Close()&lt;br /&gt;          response.Close()&lt;br /&gt;&lt;br /&gt;      &lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt;&lt;br /&gt;  &lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Namespace&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;for detailed, &lt;a href="http://msdn.microsoft.com/en-us/library/debx8sh9.aspx"&gt;read more &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-2766671527851981125?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/2766671527851981125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=2766671527851981125' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/2766671527851981125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/2766671527851981125'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2009/02/how-to-send-data-using-webrequest-class.html' title='How to: Send Data Using the WebRequest Class'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-1399272843711549632</id><published>2008-10-23T22:32:00.000-07:00</published><updated>2008-10-23T22:43:28.375-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript validation for input limited text into textbox or textarea in ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Javascript tips'/><title type='text'>Javascript validation for input limited text into textbox or textarea in ASP.NET</title><content type='html'>Javascript validation for input limited text into textbox or textarea&lt;br /&gt;On design page source::&lt;br /&gt;----------------------------&lt;br /&gt;&lt;script language="javascript" type="text/javascript"&gt;&lt;br /&gt;   &lt;br /&gt;    function LocationLength()&lt;br /&gt;    {&lt;br /&gt;        if (document.getElementById("&lt;%=txtLocation.ClientID%&gt;").value.length &gt;= 2000)&lt;br /&gt;        {&lt;br /&gt;            alert('Cannot enter more than 2000 character');&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;        document.getElementById("&lt;%=Label2.ClientID%&gt;").innerHTML = document.getElementById("&lt;%=txtLocation.ClientID%&gt;").value.length ;&lt;br /&gt;       return true;&lt;br /&gt;    }&lt;br /&gt;   &lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;On b/h code source page:&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        txtLocation.Attributes.Add("onkeypress", "return LocationLength()");&lt;br /&gt;        txtLocation.Attributes.Add("onkeyup", "return LocationLength()");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;Happy Coding..!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-1399272843711549632?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/1399272843711549632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=1399272843711549632' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/1399272843711549632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/1399272843711549632'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/10/javascript-validation-for-input-limited.html' title='Javascript validation for input limited text into textbox or textarea in ASP.NET'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-4668242216673746688</id><published>2008-10-18T06:50:00.000-07:00</published><updated>2008-10-18T06:53:56.536-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Get And Set The System Date And Time'/><category scheme='http://www.blogger.com/atom/ns#' term='c# code'/><title type='text'>Get And Set The System Date And Time using c#</title><content type='html'>Have you want to get your current system date and time as well as set the system date and time using c# code.&lt;br /&gt;here it is, C# code snippet that uses unmanaged code to retrieve the current date and time of the Windows operating system, and also sets it to the specified values.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;using&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;System&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;using&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;System&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;Collections&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;Generic&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;using&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;System&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;ComponentModel&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;using&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;System&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;Data&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;using&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;System&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;Windows&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;Forms&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;using&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;System&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;Runtime&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;InteropServices&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;namespace&lt;/span&gt; Sample&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;    &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; partial &lt;span style="color: rgb(255, 0, 0);"&gt;class&lt;/span&gt; Form1 : Form&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;    &lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; Form1&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            InitializeComponent&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;struct&lt;/span&gt; SystemTime&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt; Year;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt; Month;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt; DayOfWeek;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt; Day;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt; Hour;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt; Minute;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt; Second;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt; Millisecond;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(0, 0, 0);"&gt;[&lt;/span&gt;DllImport&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);"&gt;"kernel32.dll"&lt;/span&gt;, EntryPoint = &lt;span style="color: rgb(128, 128, 128);"&gt;"GetSystemTime"&lt;/span&gt;, SetLastError = &lt;span style="color: rgb(6, 0, 255);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(6, 0, 255);"&gt;extern&lt;/span&gt; &lt;span style="color: rgb(6, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(6, 0, 255);"&gt;void&lt;/span&gt; Win32GetSystemTime&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;ref&lt;/span&gt; SystemTime sysTime&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(0, 0, 0);"&gt;[&lt;/span&gt;DllImport&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);"&gt;"kernel32.dll"&lt;/span&gt;, EntryPoint = &lt;span style="color: rgb(128, 128, 128);"&gt;"SetSystemTime"&lt;/span&gt;, SetLastError = &lt;span style="color: rgb(6, 0, 255);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(6, 0, 255);"&gt;extern&lt;/span&gt; &lt;span style="color: rgb(6, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;bool&lt;/span&gt; Win32SetSystemTime&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;ref&lt;/span&gt; SystemTime sysTime&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(6, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(6, 0, 255);"&gt;void&lt;/span&gt; button1_Click&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;object&lt;/span&gt; sender, EventArgs e&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(0, 128, 128); font-style: italic;"&gt;// Set system date and time&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            SystemTime updatedTime = &lt;a href="http://www.google.com/search?q=new+msdn.microsoft.com"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;new&lt;/span&gt;&lt;/a&gt; SystemTime&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            updatedTime.&lt;span style="color: rgb(0, 0, 255);"&gt;Year&lt;/span&gt; = &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;2008&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            updatedTime.&lt;span style="color: rgb(0, 0, 255);"&gt;Month&lt;/span&gt; = &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;4&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            updatedTime.&lt;span style="color: rgb(0, 0, 255);"&gt;Day&lt;/span&gt; = &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;23&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(0, 128, 128); font-style: italic;"&gt;// UTC time; it will be modified according to the regional settings of the target computer so the actual hour might differ&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            updatedTime.&lt;span style="color: rgb(0, 0, 255);"&gt;Hour&lt;/span&gt; = &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;10&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            updatedTime.&lt;span style="color: rgb(0, 0, 255);"&gt;Minute&lt;/span&gt; = &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            updatedTime.&lt;span style="color: rgb(0, 0, 255);"&gt;Second&lt;/span&gt; = &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ushort&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(0, 128, 128); font-style: italic;"&gt;// Call the unmanaged function that sets the new date and time instantly&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            Win32SetSystemTime&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;ref&lt;/span&gt; updatedTime&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(0, 128, 128); font-style: italic;"&gt;// Retrieve the current system date and time&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            SystemTime currTime = &lt;a href="http://www.google.com/search?q=new+msdn.microsoft.com"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;new&lt;/span&gt;&lt;/a&gt; SystemTime&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            Win32GetSystemTime&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;ref&lt;/span&gt; currTime&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            &lt;span style="color: rgb(0, 128, 128); font-style: italic;"&gt;// You can now use the struct to retrieve the date and time&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;            MessageBox.&lt;span style="color: rgb(0, 0, 255);"&gt;Show&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);"&gt;"It's "&lt;/span&gt; + currTime.&lt;span style="color: rgb(0, 0, 255);"&gt;Hour&lt;/span&gt; + &lt;span style="color: rgb(128, 128, 128);"&gt;" o'clock. Do you know where your C# code is?"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;        &lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;    &lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;Happy Coding..!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-4668242216673746688?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/4668242216673746688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=4668242216673746688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4668242216673746688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4668242216673746688'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/10/get-and-set-system-date-and-time-using.html' title='Get And Set The System Date And Time using c#'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-636274191398109101</id><published>2008-10-18T06:41:00.000-07:00</published><updated>2008-10-18T06:48:47.956-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# code'/><category scheme='http://www.blogger.com/atom/ns#' term='Delete All Temporary Internet Files Of IE'/><title type='text'>Delete All Temporary Internet Files Of Internet Explorer</title><content type='html'>&lt;ol&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;using&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;System&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;IO&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(6, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(6, 0, 255);"&gt;void&lt;/span&gt; Main&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;   ClearFolder&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;a href="http://www.google.com/search?q=new+msdn.microsoft.com"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;new&lt;/span&gt;&lt;/a&gt; DirectoryInfo&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;Environment.&lt;span style="color: rgb(0, 0, 255);"&gt;GetFolderPath&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;Environment.&lt;span style="color: rgb(0, 0, 255);"&gt;SpecialFolder&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;InternetCache&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;; &lt;span style="color: rgb(0, 128, 128); font-style: italic;"&gt;// Execute ClearFolder() on the IE's cache folder&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(6, 0, 255);"&gt;void&lt;/span&gt; ClearFolder&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;DirectoryInfo diPath&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;   &lt;span style="color: rgb(6, 0, 255);"&gt;foreach&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;FileInfo fiCurrFile &lt;span style="color: rgb(6, 0, 255);"&gt;in&lt;/span&gt; diPath.&lt;span style="color: rgb(0, 0, 255);"&gt;GetFiles&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;   &lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;      fiCurrFile.&lt;span style="color: rgb(0, 0, 255);"&gt;Delete&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;   &lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;   &lt;span style="color: rgb(6, 0, 255);"&gt;foreach&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;DirectoryInfo diSubFolder &lt;span style="color: rgb(6, 0, 255);"&gt;in&lt;/span&gt; diPath.&lt;span style="color: rgb(0, 0, 255);"&gt;GetDirectories&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;   &lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;      ClearFolder&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;diSubFolder&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;; &lt;span style="color: rgb(0, 128, 128); font-style: italic;"&gt;// Call recursively for all subfolders&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;   &lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="font-family: 'Courier New',Courier,monospace; font-size: 12px; color: black; font-weight: normal; font-style: normal;"&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; font-size: 12px; line-height: 20px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;Happy Coding..!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-636274191398109101?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/636274191398109101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=636274191398109101' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/636274191398109101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/636274191398109101'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/10/delete-all-temporary-internet-files-of.html' title='Delete All Temporary Internet Files Of Internet Explorer'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-1184317436326020157</id><published>2008-10-16T04:12:00.000-07:00</published><updated>2008-10-16T04:18:41.327-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IP Address'/><category scheme='http://www.blogger.com/atom/ns#' term='How to get IP address of the Current Machine?'/><category scheme='http://www.blogger.com/atom/ns#' term='.net tips and tricks'/><title type='text'>How to get IP address of the Current Machine?</title><content type='html'>&lt;span class="tdvamseel"&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; UseDNS()&lt;br /&gt;{&lt;br /&gt;   &lt;span class="code-keyword"&gt;string&lt;/span&gt; hostName = Dns.GetHostName();&lt;br /&gt;   Console.WriteLine(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Host Name = "&lt;/span&gt; + hostName);&lt;br /&gt;   IPHostEntry local = Dns.GetHostByName(hostName);   &lt;br /&gt;   &lt;span class="code-keyword"&gt;foreach&lt;/span&gt;(IPAddress ipaddress &lt;span class="code-keyword"&gt;in&lt;/span&gt; local.AddressList)&lt;br /&gt;   {&lt;br /&gt;      Console.WriteLine(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;IPAddress = "&lt;/span&gt; + ipaddress.ToString());&lt;br /&gt;   }&lt;br /&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-1184317436326020157?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/1184317436326020157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=1184317436326020157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/1184317436326020157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/1184317436326020157'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/10/how-to-get-ip-address-of-current.html' title='How to get IP address of the Current Machine?'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-1427899195380550649</id><published>2008-10-11T04:28:00.000-07:00</published><updated>2008-10-11T04:35:02.625-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='there is no attribute &quot;border&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='validations'/><category scheme='http://www.blogger.com/atom/ns#' term='W3c Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='App_Browsers'/><title type='text'>Resolving w3c validation issues details...</title><content type='html'>For those who are wondering why should one bother with W3C Validations,&lt;br /&gt;please read &lt;a href="http://validator.w3.org/docs/why.html"&gt;Why should we Validate our WebSites?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When validating your website using W3C some weird errors might occur&lt;br /&gt;&lt;br /&gt;An Example is&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;there is no attribute "border".&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;even if you haven't given the border attribute&lt;br /&gt;&lt;br /&gt;The Reason&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;&lt;br /&gt;The ASP.NET engines sees the W3C validator as down-level browser and renders&lt;br /&gt;non-XHTML compliant code. Your code is most likely fine. The problem is with&lt;br /&gt;ASP.NET.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The Solution(Step Wise)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.Right Click on your Solution Explorer&lt;br /&gt;2.Click on Add ASP.NET Folder ---&gt; App_Browsers&lt;br /&gt;3.Now Click on App_Browsers ---&gt; Add New Item&lt;br /&gt;4.A dialog Box now pops up with some Visual Studio Installed Templates.&lt;br /&gt;Select the Browser File Template from there, change the name as W3CValidations.browser(any other convenient name also) and Click on the Add Button&lt;br /&gt;5.Delete the whole XML MarkUp code inside the W3CValidations.browser&lt;br /&gt;6.Place the following code instead&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;&lt;br /&gt;&lt;browsers&gt;&lt;br /&gt; &lt;!--&lt;br /&gt; Browser capability file for the w3c validator&lt;br /&gt;&lt;br /&gt; sample UA: "W3C_Validator/1.305.2.148 libwww-perl/5.803"&lt;br /&gt; --&gt;&lt;br /&gt; &lt;browser id="w3cValidator" parentid="default"&gt;&lt;br /&gt;   &lt;identification&gt;&lt;br /&gt;     &lt;useragent match="^W3C_Validator"&gt;&lt;br /&gt;   &lt;/identification&gt;&lt;br /&gt;&lt;br /&gt;   &lt;capture&gt;&lt;br /&gt;     &lt;useragent match="^W3C_Validator/(?'version'(?'major'\d+)(?'minor'\.\d+)\w*).*"&gt;&lt;br /&gt;   &lt;/capture&gt;&lt;br /&gt;&lt;br /&gt;   &lt;capabilities&gt;&lt;br /&gt;     &lt;capability name="browser" value="w3cValidator"&gt;&lt;br /&gt;     &lt;capability name="majorversion" value="${major}"&gt;&lt;br /&gt;     &lt;capability name="minorversion" value="${minor}"&gt;&lt;br /&gt;     &lt;capability name="version" value="${version}"&gt;&lt;br /&gt;     &lt;capability name="w3cdomversion" value="1.0"&gt;&lt;br /&gt;     &lt;capability name="xml" value="true"&gt;&lt;br /&gt;     &lt;capability name="tagWriter" value="System.Web.UI.HtmlTextWriter"&gt;     &lt;br /&gt;   &lt;/capabilities&gt;&lt;br /&gt; &lt;/browser&gt;&lt;br /&gt;&lt;/browsers&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;7.Now upload this Folder nad File to your Hosting Service&lt;br /&gt;8.Re Validate using &lt;a href="http://validator.w3.org/"&gt;W3C Validator&lt;/a&gt;&lt;br /&gt;9.Bingo! You got a Clean Validation Certificate.&lt;br /&gt;10. Show off the Validation Certificate to all those who cares [:)]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Happy coding..!!&lt;br /&gt;&lt;br /&gt;ref:&lt;br /&gt;http://fun2code.blogspot.com/search?updated-max=2008-08-28T15%3A02%3A00%2B05%3A30&amp;amp;max-results=3&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-1427899195380550649?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/1427899195380550649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=1427899195380550649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/1427899195380550649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/1427899195380550649'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/10/resolving-w3c-validation-issues-details.html' title='Resolving w3c validation issues details...'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-8872129190731404758</id><published>2008-10-04T04:33:00.000-07:00</published><updated>2008-10-04T04:57:16.781-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='use Messagebox in asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Tips'/><title type='text'>use Messagebox in asp.net</title><content type='html'>Declaration:&lt;br /&gt;using System.Windows.Forms;&lt;br /&gt;&lt;br /&gt;Code:&lt;br /&gt;MessageBox.Show("message right here!!");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-8872129190731404758?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/8872129190731404758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=8872129190731404758' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/8872129190731404758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/8872129190731404758'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/10/use-messagebox-in-aspnet.html' title='use Messagebox in asp.net'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-4359004478831424211</id><published>2008-10-04T04:25:00.000-07:00</published><updated>2008-10-04T04:31:20.129-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Msgbox for ASP.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='How to show messagebox in asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Tips'/><title type='text'>Msgbox for ASP.Net</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Messsagebox function for ASP.Net&lt;/span&gt;.&lt;br /&gt;Call this function from the server side, and a msgbox will appear on the client browser. As a bonus, the msgbox javascript is added after the rest of the form, so the browser displays the html for the page and then the msgbox.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Declaration:&lt;/span&gt;&lt;br /&gt;Imports System.Text&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Code:&lt;/span&gt;&lt;br /&gt;Public Sub UserMsgBox(ByVal sMsg As String)&lt;br /&gt;&lt;br /&gt;        Dim sb As New StringBuilder()&lt;br /&gt;        Dim oFormObject As System.Web.UI.Control&lt;br /&gt;&lt;br /&gt;        sMsg = sMsg.Replace("'", "\'")&lt;br /&gt;        sMsg = sMsg.Replace(Chr(34), "\" &amp;amp; Chr(34))&lt;br /&gt;        sMsg = sMsg.Replace(vbCrLf, "\n")&lt;br /&gt;        sMsg = "&lt;script language="javascript"&gt;alert(""" &amp;amp; sMsg &amp;amp; """)&lt;/script&gt;"&lt;br /&gt;&lt;br /&gt;        sb = New StringBuilder()&lt;br /&gt;        sb.Append(sMsg)&lt;br /&gt;&lt;br /&gt;        For Each oFormObject In Me.Controls&lt;br /&gt;            If TypeOf oFormObject Is HtmlForm Then&lt;br /&gt;                Exit For&lt;br /&gt;            End If&lt;br /&gt;        Next&lt;br /&gt;&lt;br /&gt;' Add the javascript after the form object so that the&lt;br /&gt;' message doesn't appear on a blank screen.&lt;br /&gt;        oFormObject.Controls.AddAt(oFormObject.Controls.Count, New LiteralControl(sb.ToString()))&lt;br /&gt;&lt;br /&gt;end sub&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Happy coding..!!&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&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/3318849733884276677-4359004478831424211?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/4359004478831424211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=4359004478831424211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4359004478831424211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4359004478831424211'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/10/msgbox-for-aspnet.html' title='Msgbox for ASP.Net'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-7935216055049768616</id><published>2008-09-29T04:50:00.000-07:00</published><updated>2008-09-29T04:59:45.921-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Error - GetTypeHashCode() : no suitable method found to override'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Tips'/><title type='text'>Error - GetTypeHashCode() : no suitable method found to override</title><content type='html'>I found it very useful so I want to it here. I found a need for it while transferring my site from vb.net to C#.&lt;br /&gt;&lt;br /&gt;After creating an ASP.NET web form using Microsoft Visual Studio 2005 or Microsoft Visual Studio 2005 Team Suite, I renamed the form from it's default name "Default.aspx" to a more user-friendly name "Order.aspx" within MS VS. After adding more code to the C# code-behind page, I discovered the following line: &lt;span style="font-weight: bold;"&gt;"public partial class _Default"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Being new to the ASP.NET programming language, I changed the &lt;span style="font-weight: bold;"&gt;"_Default"&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;"Order"&lt;/span&gt; thinking MS VS had failed to rename items within the code it generates. This caused the following error to display at debug/run time: "&lt;span style="font-weight: bold;"&gt;GetTypeHashCode() : no suitable method found to override&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;There were several other errors displayed as well.&lt;br /&gt;&lt;br /&gt;The class names must match between the .aspx and .aspx.cs web pages. Here is what the lines in each file should look like:&lt;br /&gt;&lt;br /&gt;In the ASPX source file: &lt;span style="font-weight: bold;"&gt;%@ Page Language="C#" codefile="FormName.aspx.cs" Inherits="FormName_aspx" %&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the ASPX.CS source file: public partial class&lt;span style="font-weight: bold;"&gt; FormName_aspx &lt;/span&gt;: Page&lt;br /&gt;&lt;br /&gt;Once I changed the &lt;span style="font-weight: bold;"&gt;.ASPX file to match the class name in the .ASPX.CS file&lt;/span&gt;, the &lt;span style="font-weight: bold;"&gt;errors were resolved.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ref::&lt;br /&gt;http://forums.asp.net/t/1225330.aspx&lt;br /&gt;http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/7dbed154-34c6-41e3-b44f-23a594e9ccba/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-7935216055049768616?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/7935216055049768616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=7935216055049768616' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/7935216055049768616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/7935216055049768616'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/09/error-gettypehashcode-no-suitable.html' title='Error - GetTypeHashCode() : no suitable method found to override'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-5973082174548855794</id><published>2008-09-27T05:42:00.000-07:00</published><updated>2008-09-27T05:44:54.126-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GenerateRandomName for images in asp.net 2.0 using c#'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Tips'/><title type='text'>GenerateRandomName for images in asp.net 2.0 using c#</title><content type='html'>public string GenerateRandomName()&lt;br /&gt;    {&lt;br /&gt;       &lt;br /&gt;        string allowedChars = "";&lt;br /&gt;        allowedChars = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,";&lt;br /&gt;        allowedChars += "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,";&lt;br /&gt;        allowedChars += "1,2,3,4,5,6,7,8,9,0"; &lt;br /&gt;        char[] sep ={ ',' }; &lt;br /&gt;        string[] arr = allowedChars.Split(sep); &lt;br /&gt;        string fname = ""; &lt;br /&gt;        string temp = ""; &lt;br /&gt;        Random rand = new Random(); &lt;br /&gt;        for (int i = 0; i &lt; 10; i++)&lt;br /&gt;        { &lt;br /&gt;             temp = arr[rand.Next(0, arr.Length)];&lt;br /&gt;             fname += temp; &lt;br /&gt;        }&lt;br /&gt;        return fname;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;just call this like::&lt;br /&gt; string getrandomname = GenerateRandomName;&lt;br /&gt;&lt;br /&gt;Happy Coding..!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-5973082174548855794?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/5973082174548855794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=5973082174548855794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/5973082174548855794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/5973082174548855794'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/09/generaterandomname-for-images-in-aspnet.html' title='GenerateRandomName for images in asp.net 2.0 using c#'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-4052673813118304643</id><published>2008-09-26T22:47:00.000-07:00</published><updated>2008-09-26T23:01:59.046-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='store and retrieve image from sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='c# code'/><title type='text'>code to store and retrieve image from sql server</title><content type='html'>Image tmpImg = pictureBox1.Image;&lt;br /&gt;System.IO.MemoryStream memBuffer = new System.IO.MemoryStream();&lt;br /&gt;tmpImg.Save(memBuffer, System.Drawing.Imaging.ImageFormat.Bmp);&lt;br /&gt;byte[] output = new byte[memBuffer.Length];&lt;br /&gt;memBuffer.Read(output, 0, (int)memBuffer.Length);&lt;br /&gt;// Write to SQL here &lt;br /&gt;&lt;br /&gt;// Read from SQL here &lt;br /&gt;memBuffer.Write(output, 0, output.Length);&lt;br /&gt;tmpImg = Image.FromStream(memBuffer);&lt;br /&gt;pictureBox1.Image = tmpImg;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-4052673813118304643?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/4052673813118304643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=4052673813118304643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4052673813118304643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4052673813118304643'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/09/code-to-store-and-retrieve-image-from.html' title='code to store and retrieve image from sql server'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-3478311724071921036</id><published>2008-09-12T07:40:00.000-07:00</published><updated>2008-09-12T07:52:15.306-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='How to ping a computer using windows application'/><title type='text'>How to ping a computer using windows application</title><content type='html'>// Pass host name or IP Address.&lt;br /&gt;        public void PingHost(string host)&lt;br /&gt;        {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping();&lt;br /&gt;                System.Net.NetworkInformation.PingReply pingReply = ping.Send(host);&lt;br /&gt;&lt;br /&gt;                MessageBox.Show("Status: " + pingReply.Status.ToString());&lt;br /&gt;            }&lt;br /&gt;            catch (System.Net.NetworkInformation.PingException e)&lt;br /&gt;            {&lt;br /&gt;                MessageBox.Show(e.Message);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void button1_Click(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;            PingHost(textBox1.Text.Trim());&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-3478311724071921036?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/3478311724071921036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=3478311724071921036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/3478311724071921036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/3478311724071921036'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/09/how-to-ping-computer-using-windows.html' title='How to ping a computer using windows application'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-4074442911901352404</id><published>2008-09-12T06:53:00.000-07:00</published><updated>2008-09-12T07:39:53.028-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code for Lock Computer'/><title type='text'>Code for Lock Computer, VS 2005, c#</title><content type='html'>Follwing code is for Lock a Computer. It is nothing but calling of&lt;br /&gt;“ C:\WINDOWS\system32\rundll32.exe user32.dll,LockWorkStation” command. There&lt;br /&gt;are Command for shut down, log off , restart....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;//using System.linq;&lt;br /&gt;using System.Diagnostics;&lt;br /&gt;&lt;br /&gt;namespace r.LockComputer&lt;br /&gt;{&lt;br /&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            Process.Start(@"C:\WINDOWS\system32\rundll32.exe", "user32.dll,LockWorkStation");&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-4074442911901352404?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/4074442911901352404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=4074442911901352404' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4074442911901352404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4074442911901352404'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/09/code-for-lock-computer-vs-2005-c.html' title='Code for Lock Computer, VS 2005, c#'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-792356332591008213</id><published>2008-08-26T07:13:00.000-07:00</published><updated>2008-08-26T07:23:32.836-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='Store Image or Picture into DataBase and Retrieve from Database'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Programming'/><title type='text'>Store Image or Picture into DataBase and Retrieve from Database</title><content type='html'>&lt;p&gt;Here is an example for How to store image into database and retrive that and display one by one&lt;/p&gt; &lt;p&gt;steps&lt;/p&gt;&lt;p&gt;*****&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1. create one temp folder under root&lt;br /&gt;&lt;/p&gt;&lt;p&gt;2. save this 3 files into that&lt;br /&gt;&lt;/p&gt;&lt;p&gt;3. create database in ms-sql server&lt;/p&gt; &lt;p&gt;4. note : if connection not establishing with this driver , better to use jdbc :-&gt; Odbc :-&gt; driver&lt;/p&gt; &lt;p&gt;5. database code for ms-sqlserver&lt;/p&gt; &lt;p&gt;-create table image (uid numeric(6) identity (1001,1), img image )&lt;br /&gt;-select * from image&lt;/p&gt; &lt;p&gt;getfile.html&lt;br /&gt;************&lt;/p&gt; &lt;p&gt;&lt;html&gt;&lt;br /&gt;&lt;body&gt;&lt;/p&gt; &lt;p&gt;&lt;form method="”get”" action="”./Gettostore.jsp”"&gt;&lt;br /&gt;&lt;input type="”file”" name="”path”" size="”50″/"&gt;&lt;br /&gt;&lt;input type="”submit”" value="”Submit”/"&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;/p&gt; &lt;p&gt;Gettostore.jsp&lt;br /&gt;**************&lt;/p&gt; &lt;p&gt;&lt;%@ page language=”java” import=”java.sql.*,java.io.*” errorPage=”" %&gt;&lt;br /&gt;&lt;%&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;Connection con = null;&lt;br /&gt;System.setProperty( “jdbc.drivers”, “com.microsoft.jdbc.sqlserver.SQLServerDriver” );&lt;br /&gt;Class.forName( “com.microsoft.jdbc.sqlserver.SQLServerDriver” );&lt;br /&gt;con = DriverManager.getConnection( “jdbc:microsoft:sqlserver://SCALAR6:1433;DatabaseName=JAVATEAM;SelectMethod=cursor;User=sa;Password=ontrack20″ );&lt;br /&gt;PreparedStatement pst = con.prepareStatement(”insert into image(img) values(?)”);&lt;/p&gt; &lt;p&gt;//logo path is a value which is come from file browser&lt;br /&gt;FileInputStream fis=new FileInputStream(request.getParameter ( “path” ) );&lt;br /&gt;byte[] b= new byte[fis.available()+1];&lt;br /&gt;fis.read(b);&lt;br /&gt;pst.setBytes(1,b);&lt;br /&gt;pst.executeUpdate();&lt;br /&gt;pst.close();&lt;br /&gt;con.close();&lt;br /&gt;}&lt;br /&gt;catch(SQLException e)&lt;br /&gt;{&lt;br /&gt;out.println ( e);&lt;br /&gt;}&lt;br /&gt;catch (ClassNotFoundException e)&lt;br /&gt;{&lt;br /&gt;out.println( e );&lt;br /&gt;}&lt;/p&gt; &lt;p&gt;%&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="”./Puttoview.jsp”" mce_href="”./Puttoview.jsp”"&gt; View from Database &lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;!– better u to redirect to another page and add this above &lt;a&gt; link –&gt;&lt;/p&gt; &lt;p&gt;Puttoview.jsp&lt;br /&gt;*************&lt;/p&gt; &lt;p&gt;&lt;%@ page contentType=”text/html; charset=iso-8859-1″ language=”java” import=”java.io.*,java.sql.*” errorPage=”" %&gt;&lt;br /&gt;&lt;html&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;a href="”./getfile.html”" mce_href="”./getfile.html”"&gt; Home &lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;%&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;Connection con = null;&lt;br /&gt;System.setProperty( “jdbc.drivers”, “com.microsoft.jdbc.sqlserver.SQLServerDriver” );&lt;br /&gt;Class.forName( “com.microsoft.jdbc.sqlserver.SQLServerDriver” );&lt;br /&gt;con = DriverManager.getConnection( “jdbc:microsoft:sqlserver://SCALAR6:1433;DatabaseName=JAVATEAM;SelectMethod=cursor;User=sa;Password=ontrack20″ );&lt;br /&gt;PreparedStatement pst = null;&lt;br /&gt;ResultSet rs=null;&lt;br /&gt;FileOutputStream fos;&lt;br /&gt;int i = 0;&lt;br /&gt;%&gt;&lt;/p&gt; &lt;p&gt;&lt;table border="”1″" align="”center”"&gt;&lt;/p&gt; &lt;p&gt;&lt;%&lt;br /&gt;pst = con.prepareStatement(”select uid,img from image “); // better to use where uniqueid = ‘value’&lt;br /&gt;rs=pst.executeQuery();&lt;br /&gt;while(rs.next())&lt;br /&gt;{&lt;br /&gt;i = rs.getInt (1);&lt;br /&gt;byte[] b=rs.getBytes(”img”);&lt;br /&gt;fos=new FileOutputStream(”c://tomcat4.1/webapps/ROOT/temp/image” + i + “.jpg”);&lt;br /&gt;fos.write(b);&lt;br /&gt;fos.close();&lt;/p&gt; &lt;p&gt;%&gt;&lt;/p&gt; &lt;p&gt;&lt;tr&gt;&lt;td align="”center”"&gt;&lt;img src="”./image&lt;%="i%" /&gt;.jpg” mce_src=”./image&lt;%=i%&gt;.jpg” &gt;&lt;br /&gt;&lt;%=i%&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/p&gt; &lt;p&gt;&lt;%&lt;br /&gt;}&lt;br /&gt;pst.close();&lt;br /&gt;con.close();&lt;br /&gt;}&lt;br /&gt;catch(SQLException e)&lt;br /&gt;{&lt;br /&gt;out.println ( e);&lt;br /&gt;}&lt;br /&gt;catch (ClassNotFoundException e)&lt;br /&gt;{&lt;br /&gt;out.println( e );&lt;br /&gt;}&lt;/p&gt; &lt;p&gt;%&gt;&lt;/p&gt; &lt;p&gt;&lt;/table&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;/p&gt; &lt;p&gt;//run : http://localhost:8080/temp/getfile.html&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-792356332591008213?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/792356332591008213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=792356332591008213' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/792356332591008213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/792356332591008213'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/08/store-image-or-picture-into-database.html' title='Store Image or Picture into DataBase and Retrieve from Database'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-4911602350624020392</id><published>2008-08-26T06:45:00.000-07:00</published><updated>2008-08-26T06:50:06.351-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tricks with Server.MapPath'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Tips'/><title type='text'>Tricks with Server.MapPath</title><content type='html'>The &lt;span style="font-weight:bold;"&gt;Server.MapPath&lt;/span&gt; method can be used to retrieve several interesting properties about the running ASP.NET application, for example:&lt;br /&gt;&lt;br /&gt;' the current directory&lt;br /&gt;currDir = Server.MapPath(".")&lt;br /&gt;&lt;br /&gt;' the parent directory&lt;br /&gt;parentDir = Server.MapPath("..")&lt;br /&gt;&lt;br /&gt;' the application's root directory&lt;br /&gt;rootDir = Server.MapPath("/")&lt;br /&gt;&lt;br /&gt;For example, you can store the application's root directory in an Application variable, and use it to dynamically build physical paths to other files and directories.&lt;br /&gt;&lt;br /&gt;Happy Coding..!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-4911602350624020392?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/4911602350624020392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=4911602350624020392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4911602350624020392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4911602350624020392'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/08/tricks-with-servermappath.html' title='Tricks with Server.MapPath'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-2259663023970775485</id><published>2008-08-25T00:28:00.000-07:00</published><updated>2008-08-25T04:47:42.394-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='How to ignore JavaScript errors at runtime'/><category scheme='http://www.blogger.com/atom/ns#' term='Javascript tricks'/><title type='text'>How to ignore JavaScript errors at runtime</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_YlBblkV9vL8/SLKbmJCl-QI/AAAAAAAAAEA/BvszsdPZm9I/s1600-h/stoperror.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_YlBblkV9vL8/SLKbmJCl-QI/AAAAAAAAAEA/BvszsdPZm9I/s320/stoperror.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5238420396149438722" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Happy Coding ..!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-2259663023970775485?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/2259663023970775485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=2259663023970775485' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/2259663023970775485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/2259663023970775485'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/08/how-to-ignore-javascript-errors-at.html' title='How to ignore JavaScript errors at runtime'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YlBblkV9vL8/SLKbmJCl-QI/AAAAAAAAAEA/BvszsdPZm9I/s72-c/stoperror.JPG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-76215885869020532</id><published>2008-07-24T08:22:00.000-07:00</published><updated>2008-07-24T08:27:17.559-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='How to use .Net Reserved Keywords'/><category scheme='http://www.blogger.com/atom/ns#' term='Use Reserved Keywords'/><title type='text'>ASP.NET: How To Name A Variable Or Property Using .NET’s “Reserved” Words</title><content type='html'>Let’s say you want to give your class a boolean property named &lt;span style="font-weight:bold;"&gt;Error&lt;/span&gt; that gets turned on or off if something goes awry in your code. You would think that you can’t do this because the word &lt;span style="font-weight:bold;"&gt;“Error”&lt;/span&gt; is reserved by &lt;span style="font-weight:bold;"&gt;.NET&lt;/span&gt;. However, there is a way. All you have to do is put &lt;span style="font-weight:bold;"&gt;Square Brackets&lt;/span&gt; around the word! For instance:&lt;br /&gt;&lt;br /&gt;   &lt;span style="font-weight:bold;"&gt;&lt;span style="font-style:italic;"&gt;Public Property [Error]() As Boolean&lt;/span&gt; &lt;/span&gt; &lt;br /&gt;&lt;br /&gt;Do it .! and Enjoying Coding with Reserved Keywords...&lt;br /&gt;&lt;br /&gt;Happy Coding..!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-76215885869020532?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/76215885869020532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=76215885869020532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/76215885869020532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/76215885869020532'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/07/aspnet-how-to-name-variable-or-property.html' title='ASP.NET: How To Name A Variable Or Property Using .NET’s “Reserved” Words'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-2176758133256534238</id><published>2008-07-24T08:18:00.000-07:00</published><updated>2008-07-24T08:22:21.779-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio Tricks and Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='VS 2003'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio.NET: How To Comment/Uncomment Large Blocks of Code'/><title type='text'>Visual Studio.NET: How To Comment/Uncomment Large Blocks of Code</title><content type='html'>Hello .Net Coders,&lt;br /&gt;This One is for you, &lt;br /&gt;To &lt;span style="font-weight:bold;"&gt;comment a large block of code (VS.NET)&lt;/span&gt;, highlight the area you want to comment out and hold Ctrl and press K and then C. &lt;br /&gt;To uncomment, highlight the commented area and hit Ctrl + K + U. &lt;br /&gt;The mass uncommenting merely removes the forward-most apostrophe, so if you have actual comments in your commented code that were included in your initial highlighted region, they will remain comments upon uncommenting.&lt;br /&gt;&lt;br /&gt;This tips is using at debugging time is most used by me.&lt;br /&gt;&lt;br /&gt;Happy Coding..!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-2176758133256534238?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/2176758133256534238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=2176758133256534238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/2176758133256534238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/2176758133256534238'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/07/visual-studionet-how-to.html' title='Visual Studio.NET: How To Comment/Uncomment Large Blocks of Code'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-5909499820346685164</id><published>2008-07-21T08:13:00.000-07:00</published><updated>2008-07-21T08:16:24.060-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Get Total and Free Disk Space'/><category scheme='http://www.blogger.com/atom/ns#' term='vb.net 2005'/><title type='text'>Get Total and Free Disk Space</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Declarations:&lt;/span&gt;&lt;br /&gt;Private Declare Function GetDiskFreeSpaceEx _&lt;br /&gt;    Lib "kernel32" _&lt;br /&gt;    Alias "GetDiskFreeSpaceExA" _&lt;br /&gt;    (ByVal lpDirectoryName As String, _&lt;br /&gt;    ByRef lpFreeBytesAvailableToCaller As Long, _&lt;br /&gt;    ByRef lpTotalNumberOfBytes As Long, _&lt;br /&gt;    ByRef lpTotalNumberOfFreeBytes As Long) As Long&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Code:&lt;/span&gt;&lt;br /&gt;Public Function GetFreeSpace(ByVal Drive As String) As Long&lt;br /&gt;   'returns free space in MB, formatted to two decimal places&lt;br /&gt;   'e.g., msgbox("Free Space on C: "&amp; GetFreeSpace("C:\") &amp; "MB")&lt;br /&gt;    &lt;br /&gt;        Dim lBytesTotal, lFreeBytes, lFreeBytesAvailable As Long&lt;br /&gt;&lt;br /&gt;        Dim iAns As Long&lt;br /&gt;&lt;br /&gt;        iAns = GetDiskFreeSpaceEx(Drive, lFreeBytesAvailable, _&lt;br /&gt;             lBytesTotal, lFreeBytes)&lt;br /&gt;        If ians &gt; 0 Then&lt;br /&gt;&lt;br /&gt;            Return BytesToMegabytes(lFreeBytes)&lt;br /&gt;        Else&lt;br /&gt;            Throw New Exception("Invalid or unreadable drive") &lt;br /&gt;        End If&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Function GetTotalSpace(ByVal Drive As String) As String&lt;br /&gt;  'returns total space in MB, formatted to two decimal places&lt;br /&gt;  'e.g., msgbox("Free Space on C: "&amp; GetTotalSpace("C:\") &amp; "MB")&lt;br /&gt;&lt;br /&gt;        Dim lBytesTotal, lFreeBytes, lFreeBytesAvailable As Long&lt;br /&gt;&lt;br /&gt;        Dim iAns As Long&lt;br /&gt;&lt;br /&gt;        iAns = GetDiskFreeSpaceEx(Drive, lFreeBytesAvailable, _&lt;br /&gt;             lBytesTotal, lFreeBytes)&lt;br /&gt;        If iAns &gt; 0 Then&lt;br /&gt;&lt;br /&gt;            Return BytesToMegabytes(lBytesTotal)&lt;br /&gt;        Else&lt;br /&gt;      Throw New Exception("Invalid or unreadable drive")         &lt;br /&gt;End If&lt;br /&gt;    End Function&lt;br /&gt;&lt;br /&gt;    Private Function BytesToMegabytes(ByVal Bytes As Long) _&lt;br /&gt;    As Long&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        Dim dblAns As Double&lt;br /&gt;        dblAns = (Bytes / 1024) / 1024&lt;br /&gt;        BytesToMegabytes = Format(dblAns, "###,###,##0.00")&lt;br /&gt;&lt;br /&gt;    End Function&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-5909499820346685164?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/5909499820346685164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=5909499820346685164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/5909499820346685164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/5909499820346685164'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/07/get-total-and-free-disk-space.html' title='Get Total and Free Disk Space'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-7538693089405474320</id><published>2008-07-16T04:51:00.000-07:00</published><updated>2008-07-16T04:53:16.362-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='screen keyword - vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Centering a form in VB.NET'/><title type='text'>screen keyword - vb.net, Centering a form in VB.NET</title><content type='html'>Try this one :&lt;br /&gt;&lt;br /&gt;frm.Top = (Screen.PrimaryScreen.WorkingArea.Height - frm.Height) / 2&lt;br /&gt;frm.Left = (Screen.PrimaryScreen.WorkingArea.Width - frm.Width) / 2&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-7538693089405474320?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/7538693089405474320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=7538693089405474320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/7538693089405474320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/7538693089405474320'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/07/screen-keyword-vbnet-centering-form-in.html' title='screen keyword - vb.net, Centering a form in VB.NET'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-3009102004058822945</id><published>2008-07-16T04:49:00.000-07:00</published><updated>2008-07-16T04:51:08.518-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio dot net'/><category scheme='http://www.blogger.com/atom/ns#' term='Get the Current Screen Resolution (VB.NET)'/><category scheme='http://www.blogger.com/atom/ns#' term='vb.net 2005'/><title type='text'>Get the Current Screen Resolution (VB.NET)</title><content type='html'>Public Function ScreenResolution() As String&lt;br /&gt;        Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width&lt;br /&gt;        Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height&lt;br /&gt;        Return intX &amp; " X " &amp; intY&lt;br /&gt;End Function&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-3009102004058822945?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/3009102004058822945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=3009102004058822945' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/3009102004058822945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/3009102004058822945'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/07/get-current-screen-resolution-vbnet.html' title='Get the Current Screen Resolution (VB.NET)'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-2098581578627993965</id><published>2008-07-10T04:11:00.000-07:00</published><updated>2008-07-10T04:15:13.451-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='How to get CAPS LOCK IS ON (VB.NET)'/><category scheme='http://www.blogger.com/atom/ns#' term='Capture CAPS LOCK KEY in Windows Application'/><title type='text'>How to get CAPS LOCK IS ON (VB.NET)</title><content type='html'>When User Type a Password, How to give a message CAPS LOCK is On or not.&lt;br /&gt;&lt;br /&gt;Private Sub txtPassword_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPassword.TextChanged&lt;br /&gt;        If My.Computer.Keyboard.CapsLock = True Then&lt;br /&gt;            'MsgBox("CAPS LOCK is ON", MsgBoxStyle.Information, "Password")&lt;br /&gt;        End If&lt;br /&gt;End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-2098581578627993965?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/2098581578627993965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=2098581578627993965' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/2098581578627993965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/2098581578627993965'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/07/how-to-get-caps-lock-is-on-vbnet.html' title='How to get CAPS LOCK IS ON (VB.NET)'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-4447380433756656312</id><published>2008-07-10T03:46:00.000-07:00</published><updated>2008-07-10T03:48:07.490-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Change password(VB.NET)'/><title type='text'>Change password(VB.NET)</title><content type='html'>Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click&lt;br /&gt;        If txtretype.Text = "" And txtold.Text = txtnew.Text Then&lt;br /&gt;            Try&lt;br /&gt;                cmd = New SqlCommand("insert into login values(@a, @B)", con)&lt;br /&gt;                cmd.Parameters.Add("@a", txtname.Text)&lt;br /&gt;                cmd.Parameters.Add("@b", txtretype.Text)&lt;br /&gt;               &lt;br /&gt;                cmd.ExecuteNonQuery()&lt;br /&gt;                MessageBox.Show("USER CREATED SUCCESSFULLY", "REGISTRATION", MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;&lt;br /&gt;            Catch ex As Exception&lt;br /&gt;                MsgBox(ex.Message)&lt;br /&gt;            End Try&lt;br /&gt;        End If&lt;br /&gt;    End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-4447380433756656312?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/4447380433756656312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=4447380433756656312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4447380433756656312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/4447380433756656312'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/07/change-passwordvbnet.html' title='Change password(VB.NET)'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-8423740824024203566</id><published>2008-07-02T22:36:00.000-07:00</published><updated>2008-07-02T22:38:09.002-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Simple ASP.NET Email function'/><title type='text'>Simple ASP.NET Email function</title><content type='html'>&lt;a href="http://bp0.blogger.com/_YlBblkV9vL8/SGxlsgNsD0I/AAAAAAAAADs/9ag5VMMBcx0/s1600-h/r_aspnet_mail_function.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_YlBblkV9vL8/SGxlsgNsD0I/AAAAAAAAADs/9ag5VMMBcx0/s320/r_aspnet_mail_function.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5218657883451559746" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-8423740824024203566?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/8423740824024203566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=8423740824024203566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/8423740824024203566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/8423740824024203566'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/07/simple-aspnet-email-function.html' title='Simple ASP.NET Email function'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_YlBblkV9vL8/SGxlsgNsD0I/AAAAAAAAADs/9ag5VMMBcx0/s72-c/r_aspnet_mail_function.JPG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3318849733884276677.post-2691793739919360763</id><published>2008-07-02T04:55:00.000-07:00</published><updated>2008-07-02T05:16:09.703-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Zoom Text Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Zooming'/><title type='text'>Zoom Text Javascript</title><content type='html'>Another great &lt;span style="color:#3333ff;"&gt;javascript&lt;/span&gt; that &lt;span style="color:#3333ff;"&gt;zooms text&lt;/span&gt; onto the page which can be used as an intro message. The zoom text script is fully configurable and as it utilizes layers, can be used anywhere on the page. Simply change the co-ordinates in the div tag.&lt;br /&gt;You can add as many messages as you like and change the colors to suit.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;STEP 1&lt;br /&gt;&lt;/span&gt;Copy the code below and paste this into the &lt;head&gt; section of your html document. Add your messages and change font type, size and colors, etc, where the comments are indicated.&lt;br /&gt;&lt;br /&gt;&lt;script language="Javascript"&gt;&lt;br /&gt;bname=navigator.appName;&lt;br /&gt;bversion=parseInt(navigator.appVersion)&lt;br /&gt; if ((bname=="Netscape" &amp;amp;&amp;amp; bversion&gt;=4)  (bname=="Microsoft Internet Explorer" &amp;amp;&amp;amp; bversion&gt;=4))&lt;br /&gt;{&lt;br /&gt; if (bname=="Netscape")&lt;br /&gt;{ brows=true del=30 }&lt;br /&gt;else{ brows=false del=80 }&lt;br /&gt;var msg=0; var z=0; var timer1;&lt;br /&gt;var message= new Array();&lt;br /&gt;var color= new Array();&lt;br /&gt;var values= new Array('-6','-5','-4','-3','-2','-1','+1','+2','+3','+4','+5','+6') // Change messages and colors here. Add as many as you wan't (Do not edit anything else in the Script except the lines below)&lt;br /&gt;message[0]='Like This Zoom Script?' color[0]='#FF0000'&lt;br /&gt;message[1]='A new JavaScript' color[1]='#0000FF'&lt;br /&gt;message[2]='Fully customizable and easy to use' color[2]='#FF6633'&lt;br /&gt;message[3]='From Your Javascript Guru' color[3]='#CC0033'&lt;br /&gt;message[4]='Netscape 4 supported' color[4]='#00FF00' // (Do not edit anything else in the script except the lines above)&lt;br /&gt;function start()&lt;br /&gt;{&lt;br /&gt; if ((bname=="Netscape" &amp;amp;&amp;amp; bversion&gt;=4)  (bname=="Microsoft Internet Explorer" &amp;amp;&amp;amp; bversion&gt;=4))&lt;br /&gt;{&lt;br /&gt; if(z&lt;values.length)&lt;br /&gt;{&lt;br /&gt;if (brows)&lt;br /&gt;{&lt;br /&gt; document.layers['text'].document.writeln('&lt;p class="main" align="Center"&gt;&lt;span style="font-family:Arial;font-size:'+values[z]+';color:'+color[msg]+';"&gt;&lt;nobr&gt;'+message[msg]+'&lt;/nobr&gt;&lt;/span&gt;&lt;/p&gt;') document.layers['text'].document.close();&lt;br /&gt;}&lt;br /&gt; else&lt;br /&gt;{&lt;br /&gt; text.innerHTML='&lt;pre&gt;&lt;p class="main" align="Center"&gt;&lt;span style="font-family:Arial;font-size:'+values[z]+';color:'+color[msg]+';"&gt;&lt;nobr&gt;'+message[msg]+'&lt;/nobr&gt;&lt;/span&gt;&lt;/p&gt;&lt;/pre&gt;'&lt;br /&gt;}&lt;br /&gt; z++; timer1=window.setTimeout('start()',del)&lt;br /&gt;}&lt;br /&gt;else chg();&lt;br /&gt;}&lt;br /&gt; }&lt;br /&gt;function stop()&lt;br /&gt;{&lt;br /&gt;if ((bname=="Netscape" &amp;amp;&amp;amp; bversion&gt;=4)  (bname=="Microsoft Internet Explorer" &amp;amp;&amp;amp; bversion&gt;=4))&lt;br /&gt;window.clearTimeout(timer1);&lt;br /&gt;window.clearTimeout(timer2);&lt;br /&gt; }&lt;br /&gt;function chg()&lt;br /&gt;{&lt;br /&gt;if (brows)&lt;br /&gt;{&lt;br /&gt; document.layers['text'].document.writeln('') document.layers['text'].document.close();&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;text.innerHTML='';&lt;br /&gt;if(msg&lt;message.length-1)&lt;br /&gt;{&lt;br /&gt;msg++;&lt;br /&gt; }&lt;br /&gt;else&lt;br /&gt;msg=0;&lt;br /&gt;z=0;&lt;br /&gt;timer2=window.setTimeout('start()',1000)&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;STEP 2&lt;/span&gt;&lt;br /&gt;Copy the event handler code and paste this into the body tag of your html document.&lt;br /&gt;&lt;body onload="start()" onunload="stop()"&gt;&lt;br /&gt;       onLoad="start()" onUnload="stop()"&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;STEP 3&lt;/span&gt;&lt;br /&gt;Copy the code below and place this directly below the &lt;body&gt; tag of your html document. Change the position of the zoom text effect by altering the" left" and "top" co-ordinates.&lt;br /&gt;&lt;div id="text" style="position: absolute; left: 4; top: 20"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;layer name="text" left="4" top="20"&gt; &lt;/layer&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;That;s it .!&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;Ref : &lt;a href="http://www.hypergurl.com/zoomintro.html"&gt;http://www.hypergurl.com/zoomintro.html&lt;/a&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3318849733884276677-2691793739919360763?l=codinglibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codinglibrary.blogspot.com/feeds/2691793739919360763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3318849733884276677&amp;postID=2691793739919360763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/2691793739919360763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3318849733884276677/posts/default/2691793739919360763'/><link rel='alternate' type='text/html' href='http://codinglibrary.blogspot.com/2008/07/zoom-text-javascript.html' title='Zoom Text Javascript'/><author><name>rushi</name><uri>http://www.blogger.com/profile/12397100955139331436</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04485948628665790496'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>