<?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:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2842063953021258211</id><updated>2024-10-07T09:27:05.727+05:30</updated><category term="ASP.NET - C# - Clear History From Server side"/><category term="ASP.NET 2.0 GridView control in Paging and Sorting"/><category term="Access a SQL stored procedure"/><category term="Browser  Back Button Using Javascript"/><category term="Clearing Recent Projects list in Visual Studio 2005"/><category term="Create custom web control (FilterDropDown)"/><category term="Cross Domain Data share"/><category term="Cross Domain Iframe Resize"/><category term="Disable Browser Right click event"/><category term="Iframe Problem"/><category term="Insert an image in Access Database"/><category term="Jagged Arrays in C#"/><category term="Javascript : Find location of highlighted text"/><category term="Javascript Events"/><category term="Javascript For Catch Browser close Event"/><category term="Javascript: Set Browser Home Page"/><category term="Post Data to Other website use Asp.net"/><category term="Relation objects in a dataset"/><category term="SQL a Stored Procedure to be automatically run"/><category term="Upload a file from my ASP.NET page"/><category term="javascript"/><title type='text'>SATHIS DotNET</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-8544391116138444170</id><published>2008-09-10T11:54:00.007+05:30</published><updated>2008-09-10T12:30:43.694+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cross Domain Data share"/><category scheme="http://www.blogger.com/atom/ns#" term="Cross Domain Iframe Resize"/><category scheme="http://www.blogger.com/atom/ns#" term="Iframe Problem"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Cross Domain Iframe Resize</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;color:#ff6600;&quot;&gt;&lt;u&gt;Cross Domain iframe Resize&lt;/u&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5244278915382287234&quot; style=&quot;DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdgBEpRIDu-hACiVbxhBCF6Dru1sk5Nb7ci-wkiLpWAD18u4dSZwyk4r9FCSrkpcaJCL8TzdYiY5CscYwTNgT8i7A_wLPawwzfUJF3Vi59A3nNHTxgvrcGHOwzTMt7zqPfnHiB2apRIDhP/s320/Cross+Domain+Iframe+Resize.PNG&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;span style=&quot;color:#993300;&quot;&gt;&lt;strong&gt;Domain A&lt;/strong&gt;: &lt;/span&gt;&lt;span style=&quot;color:#000000;&quot;&gt;Html Page &lt;/span&gt;&lt;br /&gt;There we want add one dummy Html Page with JavaScript&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Dummy_Page.html&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;var hashValue = window.location.hash &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;if ((hashValue != null) (hashValue.length != 0))&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;var pairs = hashValue.split(&#39;&amp;amp;&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;if ((pairs != null) &amp;amp;&amp;amp; (pairs.length &amp;gt; 0)) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;window.top.document.getElementById((pairs[1].split(&#39;=&#39;))[1]).style.height =(pairs[0].split(&#39;=&#39;))[1] +&quot;px&quot;; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#660000;&quot;&gt;&lt;strong&gt;Domain A&lt;/strong&gt;:&lt;/span&gt; Iframe Page&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;table class=&quot;content&quot; align=&quot;center&quot; width=&quot;845&quot;&amp;gt;&lt;br /&gt;&amp;lt;tbody&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td align=&quot;center&quot; valign=&quot;top&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;iframe id=&quot;Home&quot; scrolling=&quot;auto&quot; frameborder=&quot;0&quot; name=&quot;HOME&quot; style=&quot;width: 100%;&quot; src=&quot;&lt;/span&gt;&lt;a href=&quot;http://www.domainb.com/Home.aspx&quot;&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;http://www.DomainB.com/Home.aspx&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/tr&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/tbody&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/table&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;var iframe= document.getElementById(&quot;Home&quot;); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;iframe.src=iframe.src +&quot;#frameID=&quot;+ iframe.id +&quot;&amp;amp;site=http://www.DomainA.com/Dummy_Page.html&quot;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#660000;&quot;&gt;&lt;strong&gt;Domain B:&lt;/strong&gt;&lt;/span&gt; Frameheight.js&lt;br /&gt;This script file want to include in Domain B Pages&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;function call()&lt;br /&gt;{&lt;br /&gt;var hashValue = window.location.hash.substring(1);&lt;br /&gt;if ((hashValue == null) (hashValue.length == 0))&lt;br /&gt;{ }&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;var pairs = hashValue.split(&#39;&amp;amp;&#39;);&lt;br /&gt;if ((pairs != null) &amp;amp;&amp;amp; (pairs.length &gt; 0))&lt;br /&gt;{&lt;br /&gt;var iframeID = (pairs[0].split(&#39;=&#39;))[1];&lt;br /&gt;var parlocation = (pairs[1].split(&#39;=&#39;))[1];&lt;br /&gt;manage(iframeID,parlocation)&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;setTimeout(&quot;call()&quot;,10);&lt;br /&gt;}&lt;br /&gt;function manage(iframeID,parlocation)&lt;br /&gt;{&lt;br /&gt;set_cookie(&quot;iframeID&quot;,iframeID);&lt;br /&gt;set_cookie(&quot;location&quot;,parlocation);&lt;br /&gt;document.getElementById(&quot;Home_sub&quot;).src=parlocation + &quot;#Height=&quot; + (document.body.offsetHeight+30) + &quot;&amp;amp;iframeID=&quot; + iframeID;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if( get_cookie(&quot;iframeID&quot;) != null &amp;amp;&amp;amp; get_cookie(&quot;location&quot;) != null)&lt;br /&gt;{&lt;br /&gt;document.getElementById(&quot;Home_sub&quot;).src= get_cookie(&quot;location&quot;)+ &quot;#Height=&quot; + (document.body.offsetHeight+30) + &quot;&amp;amp;iframeID=&quot; + get_cookie(&quot;iframeID&quot;);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;call();&lt;br /&gt;}&lt;br /&gt;function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure )&lt;br /&gt;{&lt;br /&gt;var cookie_string = name + &quot;=&quot; + escape ( value );&lt;br /&gt;&lt;br /&gt;if ( exp_y )&lt;br /&gt;{&lt;br /&gt;var expires = new Date ( exp_y, exp_m, exp_d );&lt;br /&gt;cookie_string += &quot;; expires=&quot; + expires.toGMTString();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if ( path )&lt;br /&gt;cookie_string += &quot;; path=&quot; + escape ( path );&lt;br /&gt;&lt;br /&gt;if ( domain )&lt;br /&gt;cookie_string += &quot;; domain=&quot; + escape ( domain );&lt;br /&gt;&lt;br /&gt;if ( secure )&lt;br /&gt;cookie_string += &quot;; secure&quot;;&lt;br /&gt;&lt;br /&gt;document.cookie = cookie_string;&lt;br /&gt;}&lt;br /&gt;function get_cookie ( cookie_name )&lt;br /&gt;{&lt;br /&gt;var results = document.cookie.match ( &#39;(^;) ?&#39; + cookie_name + &#39;=([^;]*)(;$)&#39; );&lt;br /&gt;&lt;br /&gt;if ( results )&lt;br /&gt;return ( unescape ( results[2] ) );&lt;br /&gt;else&lt;br /&gt;return null;&lt;br /&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#660000;&quot;&gt;&lt;strong&gt;Domain B&lt;/strong&gt;:&lt;/span&gt; &lt;span style=&quot;color:#000000;&quot;&gt;All Pages(HTML , ASPX ,etc....)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;color:#000000;&quot;&gt;(Red color Marked Code want to insert in all the pages)&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;table class=&quot;content&quot; align=&quot;center&quot; width=&quot;845&quot;&amp;gt;&lt;br /&gt;&amp;lt;tbody&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td align=&quot;center&quot; valign=&quot;top&quot;&amp;amp;gt&lt;br /&gt;;&amp;lt;div style=&quot;padding:4px;border:solid 1px #cccccc;width:300px&quot;&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div style=&quot;padding:4px;border:solid 1px #cccccc;width:300px&quot;&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/tbody&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;&amp;lt;iframe id=&quot;Home_sub&quot; frameborder=&quot;0&quot; name=&quot;home_sub&quot; style=&quot;height:1px;width:1px;&quot; src=&quot;&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;&amp;lt;script src=&quot;Js/FrameHeight.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/8544391116138444170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/8544391116138444170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/8544391116138444170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/8544391116138444170'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/09/cross-domain-iframe-resize.html' title='Cross Domain Iframe Resize'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdgBEpRIDu-hACiVbxhBCF6Dru1sk5Nb7ci-wkiLpWAD18u4dSZwyk4r9FCSrkpcaJCL8TzdYiY5CscYwTNgT8i7A_wLPawwzfUJF3Vi59A3nNHTxgvrcGHOwzTMt7zqPfnHiB2apRIDhP/s72-c/Cross+Domain+Iframe+Resize.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-6414437495206563087</id><published>2008-06-05T09:54:00.000+05:30</published><updated>2008-06-05T09:57:27.263+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Post Data to Other website use Asp.net"/><title type='text'>Post Data to Other website use Asp.net</title><content type='html'>&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;u&gt;&lt;strong&gt;Post Data to Other website use Asp.net&lt;/strong&gt; &lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;Programmatically full up other site textboxes and submit that page using asp.net&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#6666cc;&quot;&gt;String strresponse=&quot;&quot;;&lt;br /&gt;String postData = &quot;login=user&amp;amp;password=pass123&quot;;&lt;br /&gt;byte[] byteArray = Encoding.UTF8.GetBytes(postData);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#6666cc;&quot;&gt;&lt;br /&gt;HttpWebRequest request = (HttpWebRequest) WebRequest.Create(&quot;http://www.test.com/login.aspx&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#6666cc;&quot;&gt;&lt;br /&gt;request.Method = &quot;POST&quot;;&lt;br /&gt;request.Accept = &quot;test/html&quot;;&lt;br /&gt;request.AllowAutoRedirect = true;&lt;br /&gt;request.MaximumAutomaticRedirections = 4;&lt;br /&gt;request.MaximumResponseHeadersLength = 4;&lt;br /&gt;&lt;br /&gt;request.ContentType = &quot;application/x-www-form-urlencoded&quot;;&lt;br /&gt;request.ContentLength = byteArray.Length;&lt;br /&gt;Stream newStream = request.GetRequestStream();&lt;br /&gt;&lt;br /&gt;newStream.Write(byteArray, 0, byteArray.Length);&lt;br /&gt;newStream.Close();&lt;br /&gt;&lt;br /&gt;request.Credentials = CredentialCache.DefaultCredentials;&lt;br /&gt;HttpWebResponse response = (HttpWebResponse)request.GetResponse();&lt;br /&gt;&lt;br /&gt;Stream receiveStream = response.GetResponseStream();&lt;br /&gt;&lt;br /&gt;StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;strresponse = readStream.ReadToEnd();&lt;br /&gt;&lt;br /&gt;Response.Write(strresponse);&lt;br /&gt;readStream.Close();&lt;br /&gt;response.Close();&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/6414437495206563087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/6414437495206563087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/6414437495206563087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/6414437495206563087'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/06/post-data-to-other-website-use-aspnet.html' title='Post Data to Other website use Asp.net'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-1734555982354185479</id><published>2008-06-05T09:51:00.000+05:30</published><updated>2008-06-05T09:59:02.228+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Clearing Recent Projects list in Visual Studio 2005"/><title type='text'>Clearing Recent Projects list in Visual Studio 2005</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;Clearing Recent Projects list in Visual Studio 2005&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;If you had a list of projects listed on the Visual Studio 2005 Home page&#39;s Recent Projects section and wanted to clear any of these items, there is not a way to do it using the IDE.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;You will need to go to the registry (Start-&gt;Run-&gt;regedit) and &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;remove entries &lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;from:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#6666cc;&quot;&gt;HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#6666cc;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/1734555982354185479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/1734555982354185479' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/1734555982354185479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/1734555982354185479'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/06/clearing-recent-projects-list-in-visual.html' title='Clearing Recent Projects list in Visual Studio 2005'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-7740446401021078388</id><published>2008-04-17T10:33:00.000+05:30</published><updated>2008-04-17T11:05:53.621+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET 2.0 GridView control in Paging and Sorting"/><title type='text'>ASP.NET 2.0 GridView control in Paging and Sorting</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;ASP.NET 2.0 GridView control in Paging and Sorting&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;This article will describe how you can manually implement paging and sorting for the new GridView control in ASP.NET 2.0&lt;br /&gt;&lt;br /&gt;First of all I set the AlowPaging and AllowSorting properties to true, then specified page PageSize attribute of GridView to 10. For each bound Column (that I want to be sorted) I specified the SortExpression attribute same as the column name in the database table.&lt;br /&gt;&lt;br /&gt;After doing these initial changes you need to handle the Sorting event. There are two events for sorting one is Sorting and the other is Sorted. Sorted is called just after the GridView is sorted and it’s the Sorting event in which you will need to handle the sorting logic.&lt;br /&gt;&lt;br /&gt;Here a GridViewSortEventArgs is provided from which you can get the column’s SortExpression and SortDirection. You will need to re fetch the data from database and bind that to the GridView and you need to restructure the query with order by and DESC or ASC clauses.&lt;br /&gt;&lt;br /&gt;For Paging there is the event PageIndexChanging that gives the index of the new page clicked. Here you just need to set the PageIndex property of the GridView to the new Index and re bind the data to GridView.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;u&gt;Design Page : &lt;/u&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;GridViewTest.aspx.cs&quot; Inherits=&quot;GridViewTest&quot; %&amp;gt&lt;br /&gt;&lt;br /&gt;&amp;lthtml xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &amp;gt&lt;br /&gt;&amp;lthead runat=&quot;server&quot;&amp;gt&lt;br /&gt;    &amp;lttitle&amp;gtGrid View Sorting&amp;lt/title&amp;gt&lt;br /&gt;&amp;lt/head&amp;gt&lt;br /&gt;&amp;ltbody&amp;gt&lt;br /&gt;    &amp;ltform id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt&lt;br /&gt;    &amp;ltdiv&amp;gt&lt;br /&gt;        &amp;ltasp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot; AllowPaging=&quot;True&quot; &lt;br /&gt;        AllowSorting=&quot;True&quot; OnPageIndexChanging=&quot;GridView1_PageIndexChanging&quot; &lt;br /&gt;        OnSorting=&quot;GridView1_Sorting&quot; AutoGenerateColumns=&quot;False&quot;&amp;gt&lt;br /&gt;            &amp;ltColumns&amp;gt&lt;br /&gt;                &amp;ltasp:BoundField DataField=&quot;ProjectID&quot; HeaderText=&quot;ProjectID&quot; SortExpression=&quot;ProjectID&quot; /&amp;gt&lt;br /&gt;                &amp;ltasp:BoundField DataField=&quot;Name&quot; HeaderText=&quot;Name&quot;  SortExpression=&quot;Name&quot; /&amp;gt&lt;br /&gt;                &amp;ltasp:BoundField DataField=&quot;ShortName&quot; HeaderText=&quot;ShortName&quot; SortExpression=&quot;ShortName&quot; /&amp;gt&lt;br /&gt;                &amp;ltasp:BoundField DataField=&quot;Description&quot; HeaderText=&quot;Description&quot; SortExpression=&quot;Description&quot; /&amp;gt&lt;br /&gt;                &amp;ltasp:BoundField DataField=&quot;EstimatedStartDate&quot; HeaderText=&quot;EstimatedStartDate&quot; SortExpression=&quot;EstimatedStartDate&quot;/&amp;gt&lt;br /&gt;            &amp;lt/Columns&amp;gt&lt;br /&gt;        &lt;br /&gt;        &amp;lt/asp:GridView&amp;gt&lt;br /&gt;        &amp;ltasp:HiddenField ID=&quot;Direction&quot; runat=&quot;server&quot; /&amp;gt&lt;br /&gt;        &amp;ltasp:HiddenField ID=&quot;Expression&quot; runat=&quot;server&quot; /&amp;gt&lt;br /&gt;    &amp;lt/div&amp;gt&lt;br /&gt;    &amp;lt/form&amp;gt&lt;br /&gt;&amp;lt/body&amp;gt&lt;br /&gt;&amp;lt/html&amp;gt&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;Code Page :&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Data.SqlClient;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;&lt;br /&gt;public partial class GridViewTest : System.Web.UI.Page&lt;br /&gt;{&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;if (!IsPostBack)&lt;br /&gt;{&lt;br /&gt;GridView1.DataSource = DataBinder().Tables[0];&lt;br /&gt;GridView1.DataBind();&lt;br /&gt;Direction.Value= &quot;ASC&quot;;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public DataSet DataBinder()&lt;br /&gt;{&lt;br /&gt;SqlConnection con = new SqlConnection(&quot;Data Source=Test;Initial Catalog=TESTDB_Dev;User ID=User;Password=Pass&quot;);&lt;br /&gt;con.Open();&lt;br /&gt;SqlDataAdapter adp = new SqlDataAdapter(&quot;Select ProjectID, Name ,ShortName ,Description, StartDate from Project&quot;, con);&lt;br /&gt;DataSet ds = new DataSet();&lt;br /&gt;adp.Fill(ds);&lt;br /&gt;return ds;&lt;br /&gt;}&lt;br /&gt;protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)&lt;br /&gt;{&lt;br /&gt;Expression.Value= e.SortExpression;&lt;br /&gt;if (Direction.Value!=(&quot;ASC&quot;))&lt;br /&gt;{&lt;br /&gt;Direction.Value= &quot;ASC&quot;;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;Direction.Value= &quot;DESC&quot;;&lt;br /&gt;}&lt;br /&gt;Sort(Expression.Value+&quot; &quot;+ Direction.Value);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void Sort(string Exp)&lt;br /&gt;{&lt;br /&gt;DataView DV = new DataView(DataBinder().Tables[0]);&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;DV.Sort = Exp;&lt;br /&gt;}&lt;br /&gt;catch (Exception ex)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;GridView1.DataSource = DV;&lt;br /&gt;GridView1.DataBind();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)&lt;br /&gt;{&lt;br /&gt;GridView1.PageIndex = e.NewPageIndex;&lt;br /&gt;Sort(Expression.Value+ &quot; &quot; + Direction.Value);&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;asp:boundfield headertext=&quot; ProjectID&quot; datafield=&quot; ProjectID&quot;&gt;&lt;asp:boundfield headertext=&quot;Name&quot; datafield=&quot;Name&quot;&gt;&lt;asp:boundfield headertext=&quot;ShortName&quot; datafield=&quot;ShortName&quot;&gt;&lt;asp:boundfield headertext=&quot;Description&quot; datafield=&quot;Description&quot;&gt;&lt;asp:boundfield headertext=&quot;EstimatedStartDate&quot; datafield=&quot;EstimatedStartDate&quot;&gt;&lt;asp:hiddenfield id=&quot;Direction&quot; runat=&quot;server&quot;&gt;&lt;asp:hiddenfield id=&quot;Expression&quot; runat=&quot;server&quot;&gt;&lt;/asp:hiddenfield&gt;&lt;/asp:hiddenfield&gt;&lt;/asp:boundfield&gt;&lt;/asp:boundfield&gt;&lt;/asp:boundfield&gt;&lt;/asp:boundfield&gt;&lt;/asp:boundfield&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/7740446401021078388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/7740446401021078388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/7740446401021078388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/7740446401021078388'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/04/aspnet-20-gridview-control-in-paging.html' title='ASP.NET 2.0 GridView control in Paging and Sorting'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-8244032032599174787</id><published>2008-04-07T17:57:00.000+05:30</published><updated>2008-04-07T18:05:10.880+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Relation objects in a dataset"/><title type='text'>Relation objects in a dataset</title><content type='html'>&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;strong&gt;How to use relation objects in a dataset?&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;DataSet&#39;s that contain multiple DataTable objects can use DataRelation objects to relate one table to another. Adding a DataRelation to a DataSet adds by default a UniqueConstraint to the parent table and a ForeignKeyConstraint to the child table.&lt;br /&gt;The code sample below creates a DataRelation using two DataTable objects in a DataSet. Each DataTable contains a column named CustID which serves as a &quot;relation&quot; between two the DataTable objects. The example adds a single DataRelation to the Relations collection of the DataSet. The first argument in the sample specifies the name of the DataRelation being created. The second argument sets the parent DataColumn and the third argument sets the child DataColumn.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;custDS.Relations.Add(&quot;CustOrders&quot;,custDS.Tables[&quot;Customers&quot;].Columns[&quot;CustID&quot;],custDS.Tables[&quot;Orders&quot;].Columns[&quot;CustID&quot;]);&lt;br /&gt;OR&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt; private void CreateRelation()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;DataColumn parentCol;DataColumn childCol;&lt;br /&gt;parentCol = DataSet1.Tables[&quot;Customers&quot;].Columns[&quot;CustID&quot;];&lt;br /&gt;childCol = DataSet1.Tables[&quot;Orders&quot;].Columns[&quot;CustID&quot;];&lt;br /&gt;DataRelation relCustOrder;&lt;br /&gt;relCustOrder = new DataRelation(&quot;CustomersOrders&quot;, parentCol, childCol);&lt;br /&gt;DataSet1.Relations.Add(relCustOrder);&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/8244032032599174787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/8244032032599174787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/8244032032599174787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/8244032032599174787'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/04/relation-objects-in-dataset.html' title='Relation objects in a dataset'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-4225061545370951984</id><published>2008-03-20T19:21:00.000+05:30</published><updated>2008-11-07T08:41:59.415+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Create custom web control (FilterDropDown)"/><title type='text'>Create custom web control (FilterDropDown)</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;Create custom web control (FilterDropDown)&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In this article we will have a look at implementing a custom web control. This web control will inherit from the Textbox web control and List Box Control, It working as like Dropdown List Box. But Filter feature also added and you Type your Own Text also.&lt;br /&gt;&lt;br /&gt;Suppose you have city Dropdown box. It has 1000 Cities. User City is Not there in you Dropdown, then you provide “Other” Option also, and you want add one more Text Box&lt;br /&gt;&lt;br /&gt;But Here if City is there in you Drop down you can select that and user need New city they can enter it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;Copy Following Code. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;Paste it on FilterDropDown .vb file &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;Build and Get Dll .&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;Add in your application as a control&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;color:#3366ff;&quot;&gt;Imports System.Web.UI.WebControls&lt;br /&gt;Imports System.Web.UI&lt;br /&gt;Imports System.Web&lt;br /&gt;Imports System.Data&lt;br /&gt;Imports System&lt;br /&gt;Imports System.Xml&lt;br /&gt;&lt;br /&gt;Public Class FilterDropDown&lt;br /&gt;Inherits System.Web.UI.WebControls.WebControl&lt;br /&gt;Implements INamingContainer&lt;br /&gt;&lt;br /&gt;Private Shared DropDown As New TextBox()&lt;br /&gt;Private Shared DropList As New ListBox()&lt;br /&gt;&lt;br /&gt;Public Sub New()&lt;br /&gt;MyBase.New()&lt;br /&gt;Me.Width = (Unit).Pixel(200)&lt;br /&gt;Me.BorderWidth = (Unit).Pixel(1)&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Shared Ds As New DataTable()&lt;br /&gt;Private Shared Dt As String&lt;br /&gt;Private Shared m_width As Integer = 200&lt;br /&gt;Public Property dataSource() As DataTable&lt;br /&gt;Get&lt;br /&gt;Return Ds&lt;br /&gt;End Get&lt;br /&gt;Set(ByVal value As DataTable)&lt;br /&gt;Ds = value&lt;br /&gt;End Set&lt;br /&gt;End Property&lt;br /&gt;&lt;br /&gt;Public Property dataTextField() As String&lt;br /&gt;Get&lt;br /&gt;Return Dt&lt;br /&gt;End Get&lt;br /&gt;Set(ByVal value As String)&lt;br /&gt;Dt = value&lt;br /&gt;End Set&lt;br /&gt;End Property&lt;br /&gt;Public Property FWidth() As Integer&lt;br /&gt;Get&lt;br /&gt;Return m_width&lt;br /&gt;End Get&lt;br /&gt;Set(ByVal value As Integer)&lt;br /&gt;m_width = value&lt;br /&gt;End Set&lt;br /&gt;End Property&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Protected Overloads Overrides Sub CreateChildCOntrols()&lt;br /&gt;DropList.ID = Me.ID &amp;amp; &quot;txt&quot;&lt;br /&gt;DropDown.ID = Me.ID &amp;amp; &quot;List&quot;&lt;br /&gt;&lt;br /&gt;&#39; Data Source Assign&lt;br /&gt;DropList.DataSource = Ds&lt;br /&gt;DropList.DataTextField = Dt&lt;br /&gt;DropList.DataBind()&lt;br /&gt;&lt;br /&gt;&#39;Properties&lt;br /&gt;DropList.Style.Add(&quot;position&quot;, &quot;absolute&quot;)&lt;br /&gt;DropList.Style.Add(&quot;display&quot;, &quot;none&quot;)&lt;br /&gt;DropList.Width = (Unit).Pixel(m_width)&lt;br /&gt;DropList.Height = (Unit).Pixel(200)&lt;br /&gt;DropDown.Width = (Unit).Pixel(m_width)&lt;br /&gt;&lt;br /&gt;Dim CTxtID As String = Me.ID &amp;amp; &quot;_&quot; &amp;amp; DropDown.ID&lt;br /&gt;Dim CListId As String = Me.ID &amp;amp; &quot;_&quot; &amp;amp; DropList.ID&lt;br /&gt;&lt;br /&gt;&#39;Script&lt;br /&gt;Dim LoadScript As String = &quot; &amp;lt;script language=&#39;javascript&#39; type=&#39;text/javascript&#39;&amp;gt; var myList&quot; &amp;amp; CListId &amp;amp; &quot; = new Array(); for(var i=0; i&amp;lt;document.getElementById(&#39;&quot; &amp;amp; CListId &amp;amp; &quot;&#39;).options.length;i++) { myList&quot; &amp;amp; CListId &amp;amp; &quot;[i]=document.getElementById(&#39;&quot; &amp;amp; CListId &amp;amp; &quot;&#39;).options[i].innerText; }&amp;lt;/script&amp;gt; &quot;&lt;br /&gt;Me.Page.ClientScript.RegisterStartupScript([GetType](), &quot;Load&quot;, LoadScript)&lt;br /&gt;&lt;br /&gt;Dim FocusScript As String = &quot;&amp;lt;script language=&#39;javascript&#39; type=&#39;text/javascript&#39;&amp;gt; function &quot; &amp;amp; CListId &amp;amp; &quot;show(oObject,ListID){var len = oObject.value;oObject.value=&#39;&#39;;var oTextRange = document.selection.createRange();if (oTextRange != null){var left = (oTextRange.boundingLeft-5);var Top = oTextRange.boundingTop + 17;}document.getElementById(ListID).style.top=Top;document.getElementById(ListID).style.left=left;oObject.value=len ;}&amp;lt;/script&amp;gt; &quot;&lt;br /&gt;Me.Page.ClientScript.RegisterStartupScript([GetType](), &quot;Focus&quot;, FocusScript)&lt;br /&gt;DropDown.Attributes.Add(&quot;onfocus&quot;, &quot;document.getElementById(&#39;&quot; &amp;amp; CListId &amp;amp; &quot;&#39;).style.display=&#39;block&#39;;&quot; &amp;amp; CListId &amp;amp; &quot;show(this,&#39;&quot; &amp;amp; CListId &amp;amp; &quot;&#39;);&quot;)&lt;br /&gt;DropDown.Attributes.Add(&quot;onblur&quot;, &quot;document.getElementById(&#39;&quot; &amp;amp; CListId &amp;amp; &quot;&#39;).style.display=&#39;none&#39;&quot;)&lt;br /&gt;DropDown.Attributes.Add(&quot;onkeyup&quot;, CListId &amp;amp; &quot;MyList(this,&#39;&quot; &amp;amp; CListId &amp;amp; &quot;&#39;); &quot;)&lt;br /&gt;&lt;br /&gt;Me.Page.ClientScript.RegisterStartupScript([GetType](), &quot;MyList&quot;, &quot;&amp;lt;script language=&#39;javascript&#39; type=&#39;text/javascript&#39;&amp;gt;function &quot; &amp;amp; CListId &amp;amp; &quot;MyList(txtid,listid) { var txt = txtid.value;var tot=document.getElementById(listid).options.length;for(i=0; i&amp;lt;tot;i++) { document.getElementById(listid).remove(0);}var j =0;for(i=0; i&amp;lt;myList&quot; &amp;amp; CListId &amp;amp; &quot;.length;i++) {if( (myList&quot; &amp;amp; CListId &amp;amp; &quot;[i].toUpperCase()).indexOf(txt.toUpperCase())==0) { var elOptNew = document.createElement(&#39;option&#39;); elOptNew.text = myList&quot; &amp;amp; CListId &amp;amp; &quot;[i]; document.getElementById(listid).add(elOptNew,j);j++; } } }&amp;lt;/script&amp;gt;&quot;)&lt;br /&gt;&lt;br /&gt;DropList.Attributes.Add(&quot;onChange&quot;, &quot;document.getElementById(&#39;&quot; &amp;amp; CTxtID &amp;amp; &quot;&#39;).value=this.options[this.selectedIndex].innerText&quot;)&lt;br /&gt;&lt;br /&gt;Controls.Add(DropDown)&lt;br /&gt;Controls.Add(DropList)&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Property result() As String&lt;br /&gt;Get&lt;br /&gt;Try&lt;br /&gt;Return DropDown.Text&lt;br /&gt;Catch ex As Exception&lt;br /&gt;Return &quot;&quot;&lt;br /&gt;End Try&lt;br /&gt;End Get&lt;br /&gt;Set(ByVal value As String)&lt;br /&gt;DropDown.Text = value&lt;br /&gt;End Set&lt;br /&gt;End Property&lt;br /&gt;&lt;br /&gt;End Class&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;font-size:130%;color:#ff0000;&quot;&gt;Output:&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt; &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyNnm5RSZFsDEnytTqpThqwY_0WSU2JMg32szmJGBp4X8a1vJPDxgnWYxJL94TvkohVrB-1Rszw1_AwzJ2WZHrn6G0lMnMg0eSyGGRjPSGx-w1d9Cc1iHfsi7b8oOfVXuZwX0StvAX-URv/s1600-h/withoutfilter.JPG&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5179831302251484626&quot; style=&quot;FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyNnm5RSZFsDEnytTqpThqwY_0WSU2JMg32szmJGBp4X8a1vJPDxgnWYxJL94TvkohVrB-1Rszw1_AwzJ2WZHrn6G0lMnMg0eSyGGRjPSGx-w1d9Cc1iHfsi7b8oOfVXuZwX0StvAX-URv/s320/withoutfilter.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;strong&gt;After Type Any text&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQO8FJCXivbfw2HAQbOS7MYQOqy13a9OS8R49U3Tp-qOuHWF1YXQCrp144QrCVlf1yjBgO39GXS4RZT8EFoJtWQm3hKum7KOS8C8DWQGYiQeMFb7z2E1BE86MGMj3bDJ5pcfPeTHqQLWZV/s1600-h/withfilter.JPG&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5179831680208606690&quot; style=&quot;FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQO8FJCXivbfw2HAQbOS7MYQOqy13a9OS8R49U3Tp-qOuHWF1YXQCrp144QrCVlf1yjBgO39GXS4RZT8EFoJtWQm3hKum7KOS8C8DWQGYiQeMFb7z2E1BE86MGMj3bDJ5pcfPeTHqQLWZV/s320/withfilter.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/4225061545370951984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/4225061545370951984' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/4225061545370951984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/4225061545370951984'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/create-custom-web-control.html' title='Create custom web control (FilterDropDown)'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyNnm5RSZFsDEnytTqpThqwY_0WSU2JMg32szmJGBp4X8a1vJPDxgnWYxJL94TvkohVrB-1Rszw1_AwzJ2WZHrn6G0lMnMg0eSyGGRjPSGx-w1d9Cc1iHfsi7b8oOfVXuZwX0StvAX-URv/s72-c/withoutfilter.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-7846371279868572195</id><published>2008-03-18T16:15:00.000+05:30</published><updated>2008-03-18T16:20:25.468+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL a Stored Procedure to be automatically run"/><title type='text'>SQL a Stored Procedure to be Automatically Run</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;SQL a Stored Procedure to be automatically run&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;How to setup a stored procedure to be automatically run?&lt;br /&gt;&lt;br /&gt;I needed to know how to schedule a stored procedure to run over and over! This is a brief step by step of how to get going. This isn&#39;t meant to hold your hand but get you going!&lt;br /&gt;Here is a brief how-to steps!&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;1. Open SQL Enterprise Manager &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;2. Expand the database folder, Select your database if there are several databases &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;3. Left Single click on the place where it says stored procedures &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;4. Right click after selecting and choose new stored procedure&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt; 5. Create and save your stored procedure (Even has a syntax checker!) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;6. Inside Enterprise Manager--Click on Tools, Job Scheduling (A wizard will appear) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;7. Click Next &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;8 Leave Transact SQL-command selected, Click Next &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;9. Verify the database and in the big text box type -- EXEC storedprocedurename &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;10. Click Next &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;11. This will bring up a form that allow you to do whatever. Run now is selected. To make it a reoccurring stored proc the 5th option is that. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;12. Schedule how you want the stored proc to run &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;13. Choose if you want to email or net send command. If you don&#39;t want anything click next &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;14. To modify or delete the job open SQL Enterprise Manager &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;15. Expand the Management Folder, Expand SQL Server Agent, select Jobs.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;16. This is where all the info on the jobs that you created in Job Scheduler. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;17. Right Click on the job and choose properties. That&#39;s it! &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/7846371279868572195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/7846371279868572195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/7846371279868572195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/7846371279868572195'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/sql-stored-procedure-to-be.html' title='SQL a Stored Procedure to be Automatically Run'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-7203743816050739085</id><published>2008-03-18T16:12:00.000+05:30</published><updated>2008-03-18T16:15:35.007+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Disable Browser Right click event"/><title type='text'>Disable Browser Right click event</title><content type='html'>&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;u&gt;Javascript : Disable Browser Right click event&lt;/u&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Disable Browser Right click event.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt; body oncontextmenu=&quot;return false;&quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/body &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/7203743816050739085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/7203743816050739085' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/7203743816050739085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/7203743816050739085'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/disable-browser-right-click-event.html' title='Disable Browser Right click event'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-1807159703812764356</id><published>2008-03-14T18:38:00.000+05:30</published><updated>2008-03-14T18:48:36.293+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Upload a file from my ASP.NET page"/><title type='text'>Upload a file from my ASP.NET page</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;u&gt;Upload a file from my ASP.NET page?&lt;/u&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To upload a file with your ASP.NET page, you need the use of two classes: System.Web.UI.HtmlControls.HtmlInputFile class and the System.Web.HttpPostedFile.&lt;br /&gt;The HtmlInputFile class represents an HTML input control that the user will use on the client to select a file to upload.&lt;br /&gt;&lt;br /&gt;The HttpPostedFile class represents the uploaded file. This is obtained from the .PostedFile property of the HtmlInputFile control.&lt;br /&gt;In order to use the HtmlInputFile control, you need to add the enctype attribute to your form tag as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;form id=&quot;upload&quot; method=&quot;post&quot; runat=&quot;server&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is a simple example of how to upload a file via an ASP.NET page using C#.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;%@ Import Namespace=&quot;System&quot; %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;%@ Import Namespace=&quot;System.Web&quot; %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;%@ Import Namespace=&quot;System.Web.UI.HtmlControls&quot; %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;%@ Import Namespace=&quot;System.IO&quot; %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;%@ Import Namespace=&quot;System.Drawing&quot; %&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;title&amp;gt;upload_cs&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;script language=&quot;C#&quot; runat=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;public void UploadFile(object sender, EventArgs e)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;if (loFile.PostedFile != null)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;try&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;String strFileName, strFileNamePath, strFileFolder;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;strFileFolder = Context.Server.MapPath(@&quot;data\&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;strFileName = loFile.PostedFile.FileName;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;strFileName = Path.GetFileName(strFileName);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;strFileNamePath = strFileFolder + strFileName;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;loFile.PostedFile.SaveAs(strFileNamePath);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;lblFileName.Text = strFileName;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;lblFileLength.Text = loFile.PostedFile.ContentLength.ToString();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;lblFileType.Text = loFile.PostedFile.ContentType;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;pnStatus.Visible = true;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;catch (Exception x)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Label lblError = new Label();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;lblError.ForeColor = Color.Red;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;lblError.Text = &quot;Exception occurred: &quot; + x.Message;lblError.Visible = true;this.Controls.Add(lblError);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;} &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;form id=&quot;upload_cs&quot; method=&quot;post&quot; runat=&quot;server&quot; enctype=&quot;multipart/form-data&quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;P&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;INPUT type=&quot;file&quot; id=&quot;loFile&quot; runat=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/P&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;P&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;asp:Button id=&quot;btnUpload&quot; runat=&quot;server&quot; Text=&quot; Upload &quot; OnClick=&quot;UploadFile&quot;&amp;gt;&amp;lt;/asp:Button&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/P&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;P&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;asp:Panel id=&quot;pnStatus&quot; runat=&quot;server&quot; Visible=&quot;False&quot;&amp;gt;&amp;lt;asp:Label id=&quot;lblFileName&quot; Font-Bold=&quot;True&quot; Runat=&quot;server&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt; uploaded&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;BR&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;asp:Label id=&quot;lblFileLength&quot; Runat=&quot;server&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt; bytes&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;BR&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;asp:Label id=&quot;lblFileType&quot; Runat=&quot;server&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/asp:Panel&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/P&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/body &amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt; &amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/1807159703812764356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/1807159703812764356' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/1807159703812764356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/1807159703812764356'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/upload-file-from-my-aspnet-page.html' title='Upload a file from my ASP.NET page'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-2450656190762696418</id><published>2008-03-14T16:50:00.000+05:30</published><updated>2008-03-14T16:56:45.089+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript: Set Browser Home Page"/><title type='text'>Javascript: Set Browser Home Page</title><content type='html'>&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;u&gt;Javascript: Set Browser Home Page&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This JavaScript code will enable you to place a button on your site that, when clicked on, will make your web site your visitors home page&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;FORM&amp;gt;&amp;lt;INPUT TYPE=&quot;button&quot; VALUE=&quot;Make This Site Your Home Page&quot; onClick=&quot;this.style.behavior=&#39;url(#default#homepage)&#39;; this.setHomePage(&#39;http://www.sathiskvp.blogspot.com&#39;);&quot;&amp;gt;&amp;lt;/FORM&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#000000;&quot;&gt;Example:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;INPUT TYPE=&quot;button&quot; VALUE=&quot;Make This Site Your Home Page&quot; onClick=&quot;this.style.behavior=&#39;url(#default#homepage)&#39;; this.setHomePage(&#39;http://www.sathiskvp.blogspot.com&#39;);&quot;&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/2450656190762696418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/2450656190762696418' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/2450656190762696418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/2450656190762696418'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/javascript-set-browser-home-page.html' title='Javascript: Set Browser Home Page'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-4949344279567395823</id><published>2008-03-14T11:56:00.000+05:30</published><updated>2008-03-14T12:13:14.801+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Browser  Back Button Using Javascript"/><title type='text'>Browser  Back Button Using Javascript</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;a href=&quot;http://www.sathiskvp.blogspot.com/&quot;&gt;Disable Browser  Back Button Using Javascript&lt;/a&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#000000;&quot;&gt;This javascript for disable  Browser  Back button.....&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;   javascript:window.history.forward(1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;Create Own Back Button&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#000000;&quot;&gt;create your own Back button&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;script language=&quot;JavaScript&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;   function function1()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{        &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;history.back(1);  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;input type=&quot;button&quot; value=&quot;Go back&quot; onclick=&quot;function1();&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#000000;&quot;&gt;Example&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;input type=&quot;button&quot; value=&quot;Go back&quot; onclick=&quot;javascript:history.back(1);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#000000;&quot;&gt;Some Other Links :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://quickstarts.asp.net/Futures/ajax/doc/history.aspx&quot;&gt;http://quickstarts.asp.net/Futures/ajax/doc/history.aspx&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/4949344279567395823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/4949344279567395823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/4949344279567395823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/4949344279567395823'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/browser-back-button-using-javascript.html' title='Browser  Back Button Using Javascript'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-5730740907754759989</id><published>2008-03-13T19:36:00.000+05:30</published><updated>2008-03-13T19:39:54.118+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jagged Arrays in C#"/><title type='text'>Jagged Arrays in C#</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;a href=&quot;http://www.sathiskvp.blogspot.com/&quot;&gt;What are Jagged Arrays in C#?&lt;/a&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;A special type of array is introduced in C#. A Jagged Array is an array of an array in which the length of each array index can differ.&lt;br /&gt;Example: A Jagged Array can be used is to create a table in which the lengths of the rows are not same. This Array is declared using square brackets ( [ ] ) to indicate each dimension.&lt;br /&gt;The following code demonstrates the creation of a two-dimensional jagged array.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Class Jagged&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;public static void Main()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;int [][] jagged=new int [3][];&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;jagged[0]=mew int[4]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;jagged[1]=mew int[3]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;jagged[2]=mew int[5]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;int I;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;‘Storing values in first array&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;for (I=0;I&lt;4;i++)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;jagged[0][I]=I;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;‘Storing values in second array&lt;br /&gt;&lt;br /&gt;for( I=0;I&lt;3;I++)&lt;br /&gt;jagged[1][I]=I;&lt;br /&gt;‘Storing values in third array&lt;br /&gt;&lt;br /&gt;for(I=0;I&lt;5;I++)&lt;br /&gt;jagged[2][I]=I;&lt;br /&gt;‘Displaying values from first array&lt;br /&gt;&lt;br /&gt;for (I=0;I&lt;4;I++)&lt;br /&gt;Console.WriteLine(jagged[0][I])&lt;br /&gt;‘Displaying values from second array&lt;br /&gt;&lt;br /&gt;for (I=0;I&lt;3;I++)&lt;br /&gt;Console.WriteLine(jagged[1][I])&lt;br /&gt;&lt;br /&gt;‘Displaying values from third array&lt;br /&gt;for(I=0;I&lt;5;I++)&lt;br /&gt;Console.WriteLine(jagged[2][I])&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/5730740907754759989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/5730740907754759989' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/5730740907754759989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/5730740907754759989'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/jagged-arrays-in-c.html' title='Jagged Arrays in C#'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-2190494526705146517</id><published>2008-03-13T19:30:00.000+05:30</published><updated>2008-03-13T19:35:32.371+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Insert an image in Access Database"/><title type='text'>Insert an image in Access Database</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;a href=&quot;http://www.sathiskvp.blogspot.com/&quot;&gt;How to insert an image in Access Database?&lt;/a&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;The following code asks for a path of a Gif image. Then inserts the Gif image to an Access database.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;File name is Image.vb&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Imports System&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Imports System.IO&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Imports System.Data &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Public Class SaveImageShared Sub main() &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Dim o As System.IO.FileStream&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Dim r As StreamReader&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Dim gifFile As String &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Console.Write(&quot;Enter a Valid .Gif file path&quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;gifFile = Console.ReadLine &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;If Dir(gifFile) = &quot;&quot; Then   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Console.Write(&quot;Invalid File Path&quot;)   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Exit Sub&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt; o = New FileStream(gifFile, FileMode.Open, FileAccess.Read, FileShare.Read)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;r = New StreamReader(o) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Try &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Dim FileByteArray(o.Length - 1) As Byte&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;o.Read(FileByteArray, 0, o.Length)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Dim Con As New _ &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;System.Data.OleDb.OleDbConnection(&quot;Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data  Source=Test.mdb&quot;) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Dim Sql As String = &quot;INSERT INTO Images (Pic,FileSize) VALUES (?,?)&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Dim Cmd As New System.Data.OleDb.OleDbCommand(Sql, Con)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Cmd.Parameters.Add(&quot;@Pic&quot;, System.Data.OleDb.OleDbType.Binary, o.Length).Value = FileByteArray&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Cmd.Parameters.Add(&quot;@FileSize&quot;, System.Data.OleDb.OleDbType.VarChar, 100).Value = o.Length &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Con.Open()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Cmd.ExecuteNonQuery()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Con.Close()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Catch ex As Exception&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Console.Write(ex.ToString) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;End Try&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;End Class&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/2190494526705146517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/2190494526705146517' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/2190494526705146517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/2190494526705146517'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/insert-image-in-access-database.html' title='Insert an image in Access Database'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-1473682882346975750</id><published>2008-03-13T19:27:00.000+05:30</published><updated>2008-03-13T19:30:30.564+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Access a SQL stored procedure"/><title type='text'>Access a SQL stored procedure</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;a href=&quot;http://www.sathiskvp.blogspot.com/&quot;&gt;How do I access a SQL stored procedure?&lt;/a&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;You can access SQL stored procedures the same way as executing other SQL commands. Set the query string as the name of the stored procedure and then set the CommandType to be CommandType.StoredProcedure. Below is an example of one input and one output parameter.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt;if(myConn.State == ConnectionState.Closed)myConn.Open(); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt;SqlCommand myCmd = new SqlCommand(&quot;sp_my_stored_procedure&quot;,myConn);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt;myCmd.CommandType = CommandType.StoredProcedure;&lt;br /&gt;SqlParameter parm;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt; parm = myCmd.Parameters.Add(new SqlParameter(&quot;@custid&quot;, SqlDbType.VarChar,50));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt; parm.Direction = ParameterDirection.Input;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt; myCmd.Parameters[&quot;@custid&quot;].Value = OrderID;  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt;parm = myCmd.Parameters.Add(new SqlParameter(&quot;@custName&quot;, SqlDbType.VarChar,50)); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt;parm.Direction = ParameterDirection.Output;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt;  SqlDataAdapter da = new SqlDataAdapter(); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt;da.TableMappings.Add(&quot;your mapping&quot;,&quot;your mapping&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt; da.SelectCommand = myCmd; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt;DataSet ds = new DataSet(); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt;da.Fill(ds); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;color:#3366ff;&quot;&gt;DataTable resultTable = ds.Tables[0];&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/1473682882346975750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/1473682882346975750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/1473682882346975750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/1473682882346975750'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/access-sql-stored-procedure.html' title='Access a SQL stored procedure'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-4522089074200920027</id><published>2008-03-13T19:03:00.000+05:30</published><updated>2008-03-13T19:07:19.951+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript Events"/><title type='text'>Javascript Events</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;Javascript Events&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Attribute&lt;/u&gt;                &lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;u&gt;&lt;strong&gt;The event occurs when...&lt;/strong&gt;&lt;br /&gt;&lt;/u&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onabort               &lt;/span&gt;- Loading of an image is interrupted&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onblur                &lt;/span&gt; - An element loses focus&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onchange           &lt;/span&gt; - The user changes the content of a field&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onclick&lt;/span&gt;                -Mouse clicks an &lt;span style=&quot;color:#000000;&quot;&gt;object &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;ondblclick&lt;/span&gt;          - Mouse double-clicks an object&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onerror&lt;/span&gt;              - An error occurs when loading a document or an image&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onfocus              &lt;/span&gt;- An element gets focus&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onkeydown&lt;/span&gt;       - A keyboard key is pressed&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onkeypress       &lt;/span&gt;- A keyboard key is pressed or held down&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onkeyup&lt;/span&gt;            - A keyboard key is released&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onload&lt;/span&gt;                - A page or an image is finished loading&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onmousedown&lt;/span&gt;  - A mouse button is pressed&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onmousemove&lt;/span&gt;  - The mouse is moved&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onmouseout&lt;/span&gt;      - The mouse is moved off an element&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onmouseover    &lt;/span&gt;- The mouse is moved over an element&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onmouseup&lt;/span&gt;       - A mouse button is released&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onreset              &lt;/span&gt;- The reset button is clicked&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onresize             &lt;/span&gt;- A window or frame is resized&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onselect             &lt;/span&gt;- Text is selected&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onsubmit           &lt;/span&gt;- The submit button is clicked&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;onunload           &lt;/span&gt;- The user exits the page</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/4522089074200920027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/4522089074200920027' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/4522089074200920027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/4522089074200920027'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/javascript-events.html' title='Javascript Events'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-1307655946585493016</id><published>2008-03-13T18:19:00.000+05:30</published><updated>2008-03-13T18:41:06.717+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET - C# - Clear History From Server side"/><title type='text'>ASP.NET - C# - Clear History From Server side</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;ASP.NET - C# - Clear History From Server side&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;color:#000000;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#000000;&quot;&gt;This Code For Clear History From Server side in Asp.net&lt;/span&gt;&lt;br /&gt;if you press Back it not allowed..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;private void Page_Load(object sender, System.EventArgs e)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;if(!Page.IsPostBack)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Response.Cache.SetCacheability(HttpCacheability.NoCache);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Response.Cache.SetAllowResponseInBrowserHistory(false); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;}&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/1307655946585493016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/1307655946585493016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/1307655946585493016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/1307655946585493016'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/aspnet-c-claer-history-from-server-side.html' title='ASP.NET - C# - Clear History From Server side'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-7449818961577509422</id><published>2008-03-13T17:52:00.000+05:30</published><updated>2008-03-13T18:14:13.621+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript For Catch Browser close Event"/><title type='text'>Javascript For Catch Browser close Event</title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;Javascript For Catch Browser close Event&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Occasionally there is a need to catch browser closing event. The most elegant way to catch browsing closing event in IE is the following short script&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt; html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt; head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt; title&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt; /title&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt; /head&amp;gt;&lt;br /&gt;&amp;lt; body onbeforeunload=&quot;alert(&#39;Closing&#39;);&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt; /body&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt; /html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Other Way&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;script language=&#39;javascript&#39;&amp;gt;&lt;br /&gt;function onFeforeUnloadAction(){&lt;br /&gt;var flag;&lt;br /&gt;var mesg =&quot;You are closing the window. \n do you want to continue. Click &#39;Ok&#39; to close or click \n &#39;Cancel&#39; to stay back&quot;;&lt;br /&gt;return mesg;&lt;br /&gt;}&lt;br /&gt;window.onbeforeunload = function(){if((window.event.clientX&amp;lt;0)  (window.event.clientY&amp;lt;0)){ return onBeforeUnloadAction();}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/7449818961577509422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/7449818961577509422' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/7449818961577509422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/7449818961577509422'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/javascript-for-catch-browser-close.html' title='Javascript For Catch Browser close Event'/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2842063953021258211.post-2411585213740922024</id><published>2008-03-13T17:32:00.000+05:30</published><updated>2008-03-13T17:49:06.586+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript : Find location of highlighted text"/><title type='text'></title><content type='html'>&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;Javascript For find Text or Control Location&lt;/span&gt; &lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;span style=&quot;color:#ff9966;&quot;&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;The below is just a small example on what you can do with the API. Once the text is selected, you get its offset in pixels which you can then use to distinguish between the first and second foobar.If my snippet doesn&#39;t give you what you need, also read on selection and range.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;&lt;br /&gt;function boundDim(oObject)&lt;br /&gt;{&lt;br /&gt;var oTextRange = document.selection.createRange();&lt;br /&gt;if (oTextRange != null) {&lt;br /&gt;alert(&quot;The bounding Text Left is :&quot; + oTextRange.boundingLeft);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body onclick=&quot;boundDim(this);&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Hello to all. Hello to me.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sathis-dotnet.blogspot.com/feeds/2411585213740922024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2842063953021258211/2411585213740922024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/2411585213740922024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2842063953021258211/posts/default/2411585213740922024'/><link rel='alternate' type='text/html' href='http://sathis-dotnet.blogspot.com/2008/03/below-is-just-small-example-on-what-you.html' title=''/><author><name>மா.சதீஷ் குமார்</name><uri>http://www.blogger.com/profile/09722223787857852620</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDFWbiw6lVZslxzb0_eiC258H6sRjG4sf1hVQR8xyGqiHD_PuCcm0MpZpJfS8W3updAgH1DLZqrKE5l2k475OhFwW45k5upMZJHVp2B1-em9frTTPTMpOrKAsJ2THKybc/s220/mail+-+1.jpg'/></author><thr:total>0</thr:total></entry></feed>