<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3138839697687622047</id><updated>2012-02-16T12:11:03.673-08:00</updated><title type='text'>.NET Notes</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-1821048791387108953</id><published>2012-02-02T12:37:00.000-08:00</published><updated>2012-02-02T12:55:06.848-08:00</updated><title type='text'>determining row in an item template using the row index:</title><content type='html'>http://www.ezzylearning.com/tutorial.aspx?tid=7597714&lt;br /&gt;&lt;br /&gt;javascript:&lt;br /&gt;&lt;br /&gt; row = $(editButton).parent().parent();&lt;br /&gt;   id = $("#id", row).text();&lt;br /&gt;   name = $("#name", row).text();&lt;br /&gt;   fee = $("#fee", row).text();&lt;br /&gt;   row.addClass("highlightRow");&lt;br /&gt;&lt;br /&gt;html template:&lt;br /&gt;&lt;textarea&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   &lt;ItemTemplate&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;         &lt;td&gt;&lt;br /&gt;            &lt;img id="btnEdit" style="cursor: pointer;" alt="Edit" src="images/edit.png" &lt;br /&gt;                onclick="EditStudent(this);" /&gt;                    &lt;br /&gt;         &lt;/td&gt;&lt;br /&gt;         &lt;td&gt;&lt;br /&gt;            &lt;span id="id"&gt;&lt;%# Eval("ID") %&gt;&lt;/span&gt;&lt;br /&gt;         &lt;/td&gt;&lt;br /&gt;         &lt;td&gt;&lt;br /&gt;            &lt;span id="name"&gt;&lt;%# Eval("Name")%&gt;&lt;/span&gt;&lt;br /&gt;         &lt;/td&gt;&lt;br /&gt;         &lt;td&gt;&lt;br /&gt;            &lt;span id="fee"&gt;&lt;%# Eval("Fee")%&gt;&lt;/span&gt;&lt;br /&gt;         &lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;   &lt;/ItemTemplate&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/textarea&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-1821048791387108953?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/1821048791387108953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=1821048791387108953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/1821048791387108953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/1821048791387108953'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2012/02/determining-row-in-item-template-using.html' title='determining row in an item template using the row index:'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-7273666354579708143</id><published>2012-02-02T12:36:00.001-08:00</published><updated>2012-02-02T12:36:50.633-08:00</updated><title type='text'>html notes</title><content type='html'>RULES=ROWS indicates that there should be borders between rows but not between columns.&lt;br /&gt;&lt;br /&gt;RULES = ROWS&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-7273666354579708143?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/7273666354579708143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=7273666354579708143' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/7273666354579708143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/7273666354579708143'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2012/02/html-notes.html' title='html notes'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-3133325091575421085</id><published>2012-02-02T07:29:00.001-08:00</published><updated>2012-02-02T11:35:15.182-08:00</updated><title type='text'>diagrams</title><content type='html'>database&lt;br /&gt;&lt;br /&gt;http://edn.embarcadero.com/article/31863&lt;br /&gt;&lt;br /&gt;association -- a relationship between instances of the two classes. There is an association between two classes if an instance of one class must know about the other in order to perform its work. In a diagram, an association is a link connecting two classes.&lt;br /&gt;aggregation -- an association in which one class belongs to a collection. An aggregation has a diamond end pointing to the part containing the whole. In our diagram, Order has a collection of OrderDetails.&lt;br /&gt;generalization -- an inheritance link indicating one class is a superclass of the other. A generalization has a triangle pointing to the superclass. Payment is a superclass of Cash, Check, and Credit.&lt;br /&gt;An association has two ends. An end may have a role name to clarify the nature of the association. For example, an OrderDetail is a line item of each Order.&lt;br /&gt;&lt;br /&gt;A navigability arrow on an association shows which direction the association can be traversed or queried. An OrderDetail can be queried about its Item, but not the other way around. The arrow also lets you know who "owns" the association's implementation; in this case, OrderDetail has an Item. Associations with no navigability arrows are bi-directional.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-3133325091575421085?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/3133325091575421085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=3133325091575421085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/3133325091575421085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/3133325091575421085'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2012/02/diagrams.html' title='diagrams'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-902496486313498765</id><published>2012-02-02T06:22:00.000-08:00</published><updated>2012-02-02T06:23:21.667-08:00</updated><title type='text'></title><content type='html'>finally different mvc mvvm , etc. explained simply:&lt;br /&gt;&lt;br /&gt;http://wpftutorial.net/MVVM.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-902496486313498765?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/902496486313498765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=902496486313498765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/902496486313498765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/902496486313498765'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2012/02/finally-different-mvc-mvvm-etc.html' title=''/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-2876317154250036203</id><published>2012-01-31T23:41:00.001-08:00</published><updated>2012-01-31T23:41:38.511-08:00</updated><title type='text'>set culture</title><content type='html'>CultureInfo ci = CultureInfo.CreateSpecificCulture(prefix);&lt;br /&gt;                    Thread.CurrentThread.CurrentCulture = ci;&lt;br /&gt;                    Thread.CurrentThread.CurrentUICulture = ci;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-2876317154250036203?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/2876317154250036203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=2876317154250036203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/2876317154250036203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/2876317154250036203'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2012/01/set-culture.html' title='set culture'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-3419401606807121287</id><published>2012-01-31T23:10:00.001-08:00</published><updated>2012-01-31T23:41:25.396-08:00</updated><title type='text'>XDcoument Linq to AXML</title><content type='html'>public class FeedDefintion&lt;br /&gt;    {&lt;br /&gt;        public string State { get; set; }&lt;br /&gt;        public string Zip { get; set; }&lt;br /&gt;    }&lt;br /&gt;        public void ProcessRequest(HttpContext context)&lt;br /&gt;        {&lt;br /&gt;            //write your handler implementation here.&lt;br /&gt;            XDocument xdoc = XDocument.Load(context.Server.MapPath("Listings.xml"));&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            var feeds = from feed in xdoc.Descendants("Categories")&lt;br /&gt;                        select new FeedDefintion { State = feed.Element("State").Value, Zip = feed.Element("Zip").Value };&lt;br /&gt;            List&lt;FeedDefintion&gt; fl = feeds.ToList();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            System.Web.Script.Serialization.JavaScriptSerializer oSerializer =&lt;br /&gt;                    new System.Web.Script.Serialization.JavaScriptSerializer();&lt;br /&gt;&lt;br /&gt;            string sJSON = oSerializer.Serialize(fl);&lt;br /&gt;&lt;br /&gt;            //context.Response.ContentType = "application/json";&lt;br /&gt;            context.Response.ContentType = "application/json";&lt;br /&gt;&lt;br /&gt;            sJSON = context.Request.QueryString["callback"] + "(" + sJSON + ");";&lt;br /&gt;            context.Response.Write(sJSON);&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-3419401606807121287?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/3419401606807121287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=3419401606807121287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/3419401606807121287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/3419401606807121287'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2012/01/xdcoument-linq-to-axml.html' title='XDcoument Linq to AXML'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-6211039521725099317</id><published>2012-01-22T23:15:00.000-08:00</published><updated>2012-01-22T23:19:13.094-08:00</updated><title type='text'>Creates an instance of the specified type</title><content type='html'>Activator class is extremely powerful:&lt;br /&gt;&lt;br /&gt;Contains methods to create types of objects locally or remotely, or obtain references to existing remote objects. &lt;br /&gt;&lt;br /&gt;Activator.CreateInstance&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-6211039521725099317?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/6211039521725099317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=6211039521725099317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/6211039521725099317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/6211039521725099317'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2012/01/creates-instance-of-specified-type.html' title='Creates an instance of the specified type'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-1839457386016157812</id><published>2012-01-22T14:32:00.001-08:00</published><updated>2012-01-22T14:32:40.391-08:00</updated><title type='text'>Hashtable v. Dictionary</title><content type='html'>The Dictionary(Of TKey, TValue) and ConcurrentDictionary(Of TKey, TValue)classes have the same functionality as the Hashtable class. A Dictionary(Of TKey, TValue) of a specific type (other than Object) provides better performance than a Hashtable for value types. This is because the elements of Hashtable are of type Object; therefore, boxing and unboxing typically occur when you store or retrieve a value type. The ConcurrentDictionary(Of TKey, TValue)class should be used when multiple threads might be accessing the collection simultaneously.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-1839457386016157812?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/1839457386016157812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=1839457386016157812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/1839457386016157812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/1839457386016157812'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2012/01/hashtable-v-dictionary.html' title='Hashtable v. Dictionary'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-5292366880379061245</id><published>2012-01-12T15:23:00.000-08:00</published><updated>2012-01-12T15:40:13.637-08:00</updated><title type='text'>SQL Notes</title><content type='html'>Find all references of a given stored proc or a given string.&lt;br /&gt;&lt;br /&gt;syscomments has the body text  for all user stored procs in the system. &lt;br /&gt;So you may search all stored procs that contain a given text. &lt;br /&gt;Suppose you want to see all references for a stored proc named up_MyProc.&lt;br /&gt;You may accomplish this as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;declare @keyword nvarchar(100)&lt;br /&gt;set @keyword = 'up_MyProc'               -- Enter the key word here like 'OptInInd'&lt;br /&gt;SELECT distinct 'sp_helptext ' + o.name&lt;br /&gt;FROM syscomments s, sys.objects o&lt;br /&gt;where s.id = o.object_id&lt;br /&gt;and o.type = 'P'&lt;br /&gt;and charindex(@keyword, s.text) &gt; 0&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-5292366880379061245?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/5292366880379061245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=5292366880379061245' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/5292366880379061245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/5292366880379061245'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2012/01/sql-notes.html' title='SQL Notes'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-7211217717236893039</id><published>2011-06-11T02:20:00.000-07:00</published><updated>2011-06-11T02:22:26.931-07:00</updated><title type='text'>Rebooting With remote desktop</title><content type='html'>You remote Windows computer appears hung and can't even bring up the Start Menu. How do you log off or reboot the machine?&lt;br /&gt;&lt;br /&gt;Do a &lt;span style="font-weight:bold;"&gt;CTL-ALT-END&lt;/span&gt; this brings up the Task Manager allowing you to reboot or log off.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-7211217717236893039?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/7211217717236893039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=7211217717236893039' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/7211217717236893039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/7211217717236893039'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2011/06/rebooting-with-remote-desktop.html' title='Rebooting With remote desktop'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-4869575863638328001</id><published>2011-05-03T11:27:00.001-07:00</published><updated>2011-05-03T11:31:31.209-07:00</updated><title type='text'>Modifying HTML content before on Render</title><content type='html'>You could modify the HTML that is about to be rendered to a page using the ASP.NET Render event. For example, below we add an onclick event to every a href tag on the page:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;        /// &lt;summary&gt;&lt;br /&gt;        /// Add an onclick handler to each link. Allows omniture to trace user clicks and navigation with s_objectID.&lt;br /&gt;        /// Exceptions: if onclick exists do not override or add another one to the chain.&lt;br /&gt;        /// &lt;/summary&gt;&lt;br /&gt;        protected override void Render(System.Web.UI.HtmlTextWriter writer)&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            System.IO.StringWriter stringWriter = new System.IO.StringWriter();&lt;br /&gt;            HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);&lt;br /&gt;            base.Render(htmlWriter);&lt;br /&gt;            string html = stringWriter.ToString();&lt;br /&gt;&lt;br /&gt;            // get to the first a tag and start processing from there&lt;br /&gt;            int startPoint = html.IndexOf("&lt;a");&lt;br /&gt;&lt;br /&gt;            // is there already an onclick handler on some tag in this page&lt;br /&gt;            bool hasOnclick = html.IndexOf("onclick=", StringComparison.InvariantCultureIgnoreCase) &gt; -1;&lt;br /&gt;&lt;br /&gt;            // get to the href and add an onclick handler unless one already exists&lt;br /&gt;            startPoint = html.IndexOf("href=\"", startPoint);&lt;br /&gt;            int ihref2 = 0;&lt;br /&gt;            string link;&lt;br /&gt;&lt;br /&gt;            // distniguishes links within different pages&lt;br /&gt;            string linkExtension;&lt;br /&gt;            string[] pathseg = Request.Url.Segments;&lt;br /&gt;            if (pathseg.Length &gt; 0)&lt;br /&gt;            {&lt;br /&gt;                linkExtension = pathseg[pathseg.Length - 1];&lt;br /&gt;                linkExtension = linkExtension.Replace(".", "");&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;                linkExtension = String.Empty;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            while (startPoint &gt; -1)&lt;br /&gt;            {&lt;br /&gt;                if (hasOnclick)&lt;br /&gt;                {&lt;br /&gt;                    int idx1 = html.IndexOf("&lt;a", ihref2);&lt;br /&gt;                    int idx2 = html.IndexOf("&gt;", idx1 + 1);&lt;br /&gt;                    string atag = html.Substring(idx1, idx2 - idx1);&lt;br /&gt;&lt;br /&gt;                    // is this an &lt;a tag with onclick&lt;br /&gt;                    if (atag.IndexOf("onclick", StringComparison.InvariantCultureIgnoreCase) &gt; -1)&lt;br /&gt;                    {&lt;br /&gt;                        // move to the next tag. Do not override existing onclick&lt;br /&gt;                        startPoint = startPoint + 7;&lt;br /&gt;                        startPoint = html.IndexOf("href=\"", startPoint);&lt;br /&gt;                        continue;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                startPoint = startPoint + 7;&lt;br /&gt;                ihref2 = html.IndexOf("\"", startPoint);&lt;br /&gt;                if (ihref2 &gt; -1 &amp;&amp; ihref2 &gt; startPoint)&lt;br /&gt;                {&lt;br /&gt;                    link = html.Substring(startPoint, ihref2 - startPoint).Replace("http", "").Replace("\\", "").Replace(@"/", "").Replace("\"", "").Replace("'", "").Replace(".", "").Replace("(", "").Replace(")", "").Replace(":", "");&lt;br /&gt;                    ihref2++;&lt;br /&gt;                    html = html.Substring(0, ihref2) + " onclick=\"s_objectID='" + link + linkExtension + "'\" " + html.Substring(ihref2);&lt;br /&gt;                    startPoint = html.IndexOf("href=\"", ihref2); // get the next href - ihref2 is &gt; startPoint&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                    startPoint = -1;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            writer.Write(html);&lt;br /&gt;        }&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-4869575863638328001?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/4869575863638328001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=4869575863638328001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/4869575863638328001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/4869575863638328001'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2011/05/modifying-html-content-before-on-render.html' title='Modifying HTML content before on Render'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-5011507866824007821</id><published>2008-10-10T03:46:00.001-07:00</published><updated>2008-10-10T04:28:34.854-07:00</updated><title type='text'>return key event processing in javascript</title><content type='html'>function retkey(ev) {&lt;br /&gt;&lt;br /&gt;    if (ev == null)&lt;br /&gt;        ev = window.event;&lt;br /&gt;    var key = null;&lt;br /&gt;    if (ev.keyCode)&lt;br /&gt;        key = ev.keyCode;&lt;br /&gt;    else if (ev.which)&lt;br /&gt;        key = ev.which;&lt;br /&gt;        &lt;br /&gt;    if (key != null &amp;&amp; key == 13)&lt;br /&gt;        return ClientValidate();&lt;br /&gt;&lt;br /&gt;    return true;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-5011507866824007821?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/5011507866824007821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=5011507866824007821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/5011507866824007821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/5011507866824007821'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2008/10/return-key-event-processing-in.html' title='return key event processing in javascript'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-5737550248418296793</id><published>2008-09-25T19:04:00.000-07:00</published><updated>2008-09-25T19:06:29.295-07:00</updated><title type='text'>Calculating absolute position</title><content type='html'>// here is a Javascript routine that calculates the absolute position of an html &lt;br /&gt;// element by recursively traversing the parent dom elements &lt;br /&gt;// (works in IE, Firefox, Safari , etc.)&lt;br /&gt;&lt;br /&gt;Map.Drawing.Point.prototype.addAbsolutePosition = function(obj) {&lt;br /&gt;        var X, Y;&lt;br /&gt;        var cur;&lt;br /&gt;        if (!obj) {&lt;br /&gt;            return this;&lt;br /&gt;        } &lt;br /&gt;        else &lt;br /&gt;        {&lt;br /&gt;            X=parseInt("0" + this.x);&lt;br /&gt;            Y=parseInt("0" + this.y);&lt;br /&gt;            var o = obj;&lt;br /&gt;            if (o.offsetParent) //then this object has a container that affects its position&lt;br /&gt;            {&lt;br /&gt;                while (o.offsetParent)&lt;br /&gt;                {&lt;br /&gt;                    X += parseInt(o.offsetLeft);&lt;br /&gt;                    Y += parseInt(o.offsetTop);&lt;br /&gt;                    o = o.offsetParent; //traverse the hierarchy upward&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            else if (o.x || o.y) //no container but an absolute position&lt;br /&gt;            {&lt;br /&gt;                if (o.x) X += parseInt(o.x);&lt;br /&gt;                if (o.y) Y += parseInt(o.y);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            this.x = X;&lt;br /&gt;            this.y = Y;&lt;br /&gt;            &lt;br /&gt;            return this;        &lt;br /&gt;        }&lt;br /&gt;    };&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-5737550248418296793?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/5737550248418296793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=5737550248418296793' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/5737550248418296793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/5737550248418296793'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2008/09/calculating-absolute-position.html' title='Calculating absolute position'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-4532735424996798084</id><published>2008-09-16T18:49:00.001-07:00</published><updated>2009-04-22T23:11:44.597-07:00</updated><title type='text'>301 Redirects</title><content type='html'>To fully retire a page and redirect to a new page SEO (Search Engine Optimization) recommends 301 redirects (as opposed to the regular 303 redirects).&lt;br /&gt;&lt;br /&gt;Below is the essential code fragment in Global.asax of the .NET framework to issue a 301 SEO friendly redirect:&lt;br /&gt;&lt;br /&gt;// below we are redirecting to www.mynewurl.com &lt;br /&gt;protected void Application_BeginRequest(Object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;     string oldserver = HttpContext.Current.Request.Url.AbsoluteUri;&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;      // Check whether it is an old url&lt;br /&gt;      if (oldserver.IndexOf("myoldurl.com") &gt; -1)&lt;br /&gt;     {&lt;br /&gt;       HttpContext incoming = HttpContext.Current;&lt;br /&gt;&lt;br /&gt;       incoming.Response.StatusCode = 301;&lt;br /&gt;       incoming.Response.AddHeader("Location", "http://www.mynewurl.com"));&lt;br /&gt;       incoming.Response.End();               &lt;br /&gt;       return;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// end of 301 redirect logic&lt;br /&gt;&lt;br /&gt;In .NET this could better be done with an httpModule. Coding this as an httpModule (instead of in Global.asax) is beyond the scope of this article.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-4532735424996798084?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/4532735424996798084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=4532735424996798084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/4532735424996798084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/4532735424996798084'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2008/09/301-redirects.html' title='301 Redirects'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-6990730103660504797</id><published>2008-08-30T09:43:00.000-07:00</published><updated>2009-02-24T18:07:25.263-08:00</updated><title type='text'>Search Engine Optimization (SEO)</title><content type='html'>1- Use the H tages (H1, H2, H3, H4, etc.) &lt;h&gt; tags for important keyword text&lt;br /&gt;- You may repeat your keywords throughout the page (increases density) and bolding and italizing them is also benefitial.&lt;br /&gt;- Keywords at top, but repeat them at bottom. the GO logic is that if something is said at top and repeated at bottom  it must be important.&lt;br /&gt;- Use rel="nofollow" on href tags&lt;br /&gt;- All lower case (or same case) file names. &lt;br /&gt;- Do not use "_" in filenames; instead use "-"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-6990730103660504797?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/6990730103660504797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=6990730103660504797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/6990730103660504797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/6990730103660504797'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2008/08/search-engine-optimization-seo.html' title='Search Engine Optimization (SEO)'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-4276127921586401658</id><published>2008-01-30T14:45:00.000-08:00</published><updated>2008-01-30T14:47:29.451-08:00</updated><title type='text'>Optimizing ASP.NET and HTML pages</title><content type='html'>A comprehensive checklist will serve you well:&lt;br /&gt;&lt;br /&gt;- Turn ViewState off on page and control levels when not needed&lt;br /&gt;&lt;br /&gt;- Turn SessionState off:&lt;br /&gt;"Session objects consume valuable resources. By turning off sessions, you can improve the performance and scalability of your ASP Web application. You can turn off session state either for the whole Web site or for specific ASP pages."&lt;br /&gt;http://support.microsoft.com/kb/244465&lt;br /&gt; &lt;br /&gt;- Alternatives to server controls include simple rendering, HTML elements, inline Response.Write calls, and raw inline angle brackets (&lt;% %&gt;).&lt;br /&gt;(http://msdn2.microsoft.com/en-us/library/ms998549.aspx)&lt;br /&gt; &lt;br /&gt;- Especially if not compressing html: &lt;br /&gt;Remove or reduce white space. Removing white spaces can dramatically reduce the size of your pages.  Less white space did have about a 5-10K impact on move.com home page when viewed on the browser File-Properties. &lt;br /&gt;&lt;br /&gt;-Avoid long control names; especially ones that are repeated in a DataGrid or Repeater control. Control names are used to generate unique HTML ID names. A 10-character control name can easily turn into 30 to 40 characters when it is used inside nested controls that are repeated. &lt;br /&gt; &lt;br /&gt;- Use Output caching for user controls , pages, etc. (%@OutputCache directive&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;- Use static properties instead of the Application object to store application state. &lt;br /&gt;(http://msdn2.microsoft.com/en-us/library/ms998549.aspx)&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;- Use client side validation to avoid unnecessary server hits&lt;br /&gt; &lt;br /&gt;-Avoid Creating Deep Hierarchies of Controls (see http://msdn2.microsoft.com/en-us/library/ms998549.aspx#scalenetchapt06_topic11)&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Checklist: ASP.NET Performance:&lt;br /&gt;http://msdn2.microsoft.com/en-us/library/ms998596.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-4276127921586401658?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/4276127921586401658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=4276127921586401658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/4276127921586401658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/4276127921586401658'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2008/01/optimizing-aspnet-and-html-pages.html' title='Optimizing ASP.NET and HTML pages'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-3048737563372810361</id><published>2008-01-03T10:41:00.000-08:00</published><updated>2008-01-03T10:43:17.381-08:00</updated><title type='text'>flushing DNS in Windows and MAC OS</title><content type='html'>Windows:&lt;br /&gt;&lt;br /&gt;ipconfig /flushdns&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;MAC (before Leopard):&lt;br /&gt;sudo lookupd -flushcache&lt;br /&gt;&lt;br /&gt;MAC - Leopard:&lt;br /&gt;dscacheutil -flushcache&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-3048737563372810361?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/3048737563372810361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=3048737563372810361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/3048737563372810361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/3048737563372810361'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2008/01/flushing-dns-in-windows-and-mac-os.html' title='flushing DNS in Windows and MAC OS'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-2962865082853083288</id><published>2007-08-02T23:25:00.000-07:00</published><updated>2007-08-04T23:37:49.866-07:00</updated><title type='text'>Efficient .ASPX pages</title><content type='html'>A comprehensive checklist would be great. Slowing tickets could be assigned to violators and we could better arrive and agree on guidelines; otherwise, what is known may still be ignored or forgotten. &lt;br /&gt; &lt;br /&gt;So its worth mentioning the following (and more):&lt;br /&gt;&lt;br /&gt;- Turn ViewState off on page and control levels when not needed&lt;br /&gt;- Turn SessionState off:&lt;br /&gt;"Session objects consume valuable resources. By turning off sessions, you can improve the performance and scalability of your ASP Web application. You can turn off session state either for the whole Web site or for specific ASP pages."&lt;br /&gt;&lt;br /&gt;http://support.microsoft.com/kb/244465&lt;br /&gt;&lt;br /&gt;- Alternatives to server controls include simple rendering, HTML elements, inline Response.Write calls, and raw inline angle brackets (&lt;% %&gt;).&lt;br /&gt;&lt;br /&gt;(http://msdn2.microsoft.com/en-us/library/ms998549.aspx)&lt;br /&gt;&lt;br /&gt;- Especially if not compressing html: &lt;br /&gt;Remove or reduce white space. Removing white spaces can dramatically reduce the size of your pages.  Less white space did have about a 5-10K impact on move.com home page when viewed on the browser File-Properties. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-Avoid long control names; especially ones that are repeated in a DataGrid or Repeater control. Control names are used to generate unique HTML ID names. A 10-character control name can easily turn into 30 to 40 characters when it is used inside nested controls that are repeated. &lt;br /&gt;&lt;br /&gt;- Use Output caching for user controls , pages, etc. (%@OutputCache directive&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Use static properties instead of the Application object to store application state. &lt;br /&gt;(http://msdn2.microsoft.com/en-us/library/ms998549.aspx)&lt;br /&gt;&lt;br /&gt;- Consider html size and preformance differences such as:&lt;br /&gt;   a label with onclick vs an href onclick&lt;br /&gt;   a Literal vs a label's final html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-Use Page.IsPostBack to Minimize Redundant Processing&lt;br /&gt;- Use client side validation to avoid unecessary server hits&lt;br /&gt;&lt;br /&gt;-Avoid Creating Deep Hierarchies of Controls (see http://msdn2.microsoft.com/en-us/library/ms998549.aspx#scalenetchapt06_topic11)&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;http://msdn2.microsoft.com/en-us/library/ms998596.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-2962865082853083288?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/2962865082853083288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=2962865082853083288' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/2962865082853083288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/2962865082853083288'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2007/08/efficient-aspx-pages.html' title='Efficient .ASPX pages'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-1360026756200171280</id><published>2007-05-04T17:37:00.000-07:00</published><updated>2009-03-16T17:17:40.066-07:00</updated><title type='text'>Reading a .csv or a comma-delimited .txt  file using SQL</title><content type='html'>Sample code for Reading a .csv or a comma-delimited .txt  file using SQL:&lt;br /&gt;&lt;br /&gt;Below:&lt;br /&gt;1) StoragePath is the absolute path to the .csv file.&lt;br /&gt;2) Substitute MyFileName.csv with your file name.&lt;br /&gt;&lt;br /&gt;  using System.Data.Odbc;&lt;br /&gt;  public void ReadData()&lt;br /&gt;  {&lt;br /&gt;  string StoragePath = @"c:\test";&lt;br /&gt;   string strSQL = "Select * from MyFileName.csv";&lt;br /&gt;   OdbcConnection  conn = new OdbcConnection(&lt;br /&gt;    @"Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ="+StoragePath);&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;   conn.Open();  &lt;br /&gt;   &lt;br /&gt;   OdbcDataAdapter da = new OdbcDataAdapter(strSQL, conn);  &lt;br /&gt;&lt;br /&gt;   DataSet ds = new DataSet();&lt;br /&gt;   &lt;br /&gt;   da.Fill(ds);  &lt;br /&gt;&lt;br /&gt;   conn.Close();&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-1360026756200171280?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/1360026756200171280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=1360026756200171280' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/1360026756200171280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/1360026756200171280'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2007/05/reading-csv-or-comma-delimited-txt-file.html' title='Reading a .csv or a comma-delimited .txt  file using SQL'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-2719459850616140267</id><published>2007-04-29T23:03:00.000-07:00</published><updated>2007-04-29T23:04:50.908-07:00</updated><title type='text'>Class does not support automation</title><content type='html'>Javascript: "Class does not support automation". Occurs when opening a popup.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;http://www.anetforums.com/posts.aspx?ThreadIndex=8917&lt;br /&gt; &lt;br /&gt;regsvr32 Shdocvw.dll &lt;br /&gt;regsvr32 Shell32.dll &lt;br /&gt;regsvr32 Oleaut32.dll &lt;br /&gt;regsvr32 Actxprxy.dll &lt;br /&gt;regsvr32 Mshtml.dll &lt;br /&gt;regsvr32 Urlmon.dll&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-2719459850616140267?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/2719459850616140267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=2719459850616140267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/2719459850616140267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/2719459850616140267'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2007/04/class-does-not-support-automation.html' title='Class does not support automation'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-5633689305777272509</id><published>2006-11-09T01:01:00.001-08:00</published><updated>2006-11-09T01:01:38.665-08:00</updated><title type='text'>Calling a Windows or DOS Process from a Web Application</title><content type='html'>Your favorite program (graphics package, spell checker, translator, data converter) is written in Windows or DOS and you like to utilize it in your new web application. Suppose you like to generate your favorite pie chart (in real-time) using a DOS application and display the resulting pie image on your web page. When the Web user presses the submit button you will generate a new chart and display it to the user. This could be done seamlessly by invoking your DOS application using the System.Diagnostics.Process.Start() method or the more versatile System.Diagnostics.ProcessStartInfo class. &lt;br /&gt;&lt;br /&gt;Lets start with the basic System.Diagnostics.Process.Start() method &lt;br /&gt;It is simply a method call with conventional DOS space-seperated parametrs. For example in C#: &lt;br /&gt;&lt;br /&gt;System.Diagnostics.Process.Start("MyImageProgram.bat",  @"MyFile -g -r MyLastParam"); &lt;br /&gt;&lt;br /&gt;The first parameter is the program you want to run and the second parameter is a space-seperated list of parameter(s) to pass to the program. &lt;br /&gt;Process.Start() waits forever for the process to execute. This could make your web site non-responsive. &lt;br /&gt;System.Diagnostics.ProcessStartInfo gives you much more control to accomplish the same thing. For example, you could control the maximum amount of time to wait for the process completion. &lt;br /&gt;Lets look at an example: &lt;br /&gt;&lt;br /&gt; &lt;br /&gt; using System.Diagnostics; &lt;br /&gt;using System.IO;&lt;br /&gt;&lt;br /&gt;public void Main()&lt;br /&gt;{ &lt;br /&gt; SyncCall(@"C:\MyWebSites\Images\MyImageProgram.bat",  @"MyFile -g -r MyLAstParam"); &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void SyncCall(string strProgramName, string syncParam)&lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(strProgramName); &lt;br /&gt;&lt;br /&gt;// store your parameters &lt;br /&gt;psi.Arguments = syncParam;&lt; /FONT &gt; &lt;br /&gt;&lt;br /&gt;psi.UseShellExecute = false;&lt; /FONT &gt; // Specify for proper execution &lt;br /&gt;&lt;br /&gt;System.Diagnostics.Process listFiles; &lt;br /&gt;listFiles = System.Diagnostics.Process.Start(psi);&lt; /FONT &gt; &lt;br /&gt;&lt;br /&gt;// optional for debugging. Grab the program console output&lt;br /&gt;//System.IO.StreamReader myOutput = listFiles.StandardOutput; &lt;br /&gt;&lt;br /&gt;// Wait a Maximum of 5000 milliseconds (5 seconds ) for the program execution. &lt;br /&gt;listFiles.WaitForExit(5000); &lt;br /&gt;&lt;br /&gt;// optional for debugging. Grab the program console output&lt;br /&gt;/* string output;&lt;br /&gt;if (listFiles.HasExited) &lt;br /&gt;{ &lt;br /&gt;output = myOutput.ReadToEnd(); &lt;br /&gt;}&lt;br /&gt;*/  &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Above, you specify the maximum amount to wait with the WaitForExit() method. If your program finishes faster than the amount of time you specified the system will not wait any longer and execution proceeds to the next line&lt;br /&gt;&lt;br /&gt;(Also if your program outputs to the console you could grab the text using System.IO.StreamReader. Grabbing the text slows down execution. So it is only recommended for debugging.) &lt;br /&gt;&lt;br /&gt;Above, after the image file is generated in real-time you could refer to it using an &lt;img&gt; tag or server side tag. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Copyright @ Isaac Levy, Los Angeles, CA&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-5633689305777272509?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/5633689305777272509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=5633689305777272509' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/5633689305777272509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/5633689305777272509'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2006/11/calling-windows-or-dos-process-from-web.html' title='Calling a Windows or DOS Process from a Web Application'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-7884942747510899457</id><published>2006-11-09T00:57:00.001-08:00</published><updated>2006-11-09T00:57:51.591-08:00</updated><title type='text'>Finding duplicates in a table using SQL</title><content type='html'>In Transact SQL duplicate rows for a table mytable based on column mycolumn may be found as follows:&lt;br /&gt;&lt;br /&gt;SELECT myfield, COUNT(*)&lt;br /&gt;FROM mytable&lt;br /&gt;GROUP BY myfield&lt;br /&gt;HAVING COUNT(*) &gt; 1;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-7884942747510899457?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/7884942747510899457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=7884942747510899457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/7884942747510899457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/7884942747510899457'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2006/11/finding-duplicates-in-table-using-sql.html' title='Finding duplicates in a table using SQL'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-6678709591347043620</id><published>2006-11-09T00:56:00.001-08:00</published><updated>2006-11-09T00:56:51.370-08:00</updated><title type='text'>Caching in .NET handlers</title><content type='html'>Browser caching of a .NET handler may prevent the server-side code of the handler to be invoked. A user requesting an action for a second time may not get his/her results because your handler is cached and the invocation does not occur.&lt;br /&gt;&lt;br /&gt;This problem also depends on how long the handler is being cached. If in your browser you delete all offline content (Tools - Internet Options - Delete Fiels - Check Delete all offline content - OK - OK) then your handler is no longer cached.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The solution is to add the following code to the ProcessRequest function of the handler: &lt;br /&gt;&lt;br /&gt;// Don't allow this response to be cached by the browser.         &lt;br /&gt;context.Response.Cache.SetCacheability(HttpCacheability.NoCache);&lt;br /&gt;context.Response.Cache.SetNoStore();&lt;br /&gt;context.Response.Cache.SetExpires(DateTime.MinValue); &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Isaac Levy, August 2006&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-6678709591347043620?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/6678709591347043620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=6678709591347043620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/6678709591347043620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/6678709591347043620'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2006/11/caching-in-net-handlers.html' title='Caching in .NET handlers'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-1914687387602708546</id><published>2006-11-09T00:55:00.000-08:00</published><updated>2006-11-09T00:57:22.012-08:00</updated><title type='text'>RegisterForEventValidation and event validation</title><content type='html'>When submitting pages in ASP.NET 2.0 you may get a validation error.&lt;br /&gt;&lt;br /&gt;"Invalid postback or callback argument.&lt;br /&gt;Description: An unhandled exception  occurred during the execution of the current web request. "&lt;br /&gt;&lt;br /&gt;Event validation is enabled using &lt;pages enableeventvalidation="true"&gt; in configuration or &lt;%@ Page&gt;  EnableEventValidation="true" %&gt; in a page&lt;br /&gt;&lt;br /&gt;For security purposes it is not advisable to turn off validation.&lt;br /&gt;&lt;br /&gt;The error occurs for one of the following reasons:&lt;br /&gt;&lt;br /&gt;1) You have a server-side asp control (such as a drop down) that you populate using javascript. The server-side rendered values do not match the populated values since you populated the drop down on the client-side.&lt;br /&gt;&lt;br /&gt;2) You have an invalid HTML on the page. (For example, you may have a closing /form tag without a corresponding beginning form tag!). You may want to run your HTML through one of many free HTML validators on the  Internet.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the first case where you have populated your drop down with Javascript you could eliminate the error by calling the RegisterForEventValidation function. RegisterForEventValidation can only be called during Render().&lt;br /&gt;You will need to register each valid value that you use in the Javascript code. For example if you populate a drop down with U.S. state abbreviations, you need to register each state code on the server side as follows:&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;br /&gt;     &lt;p class="MsoNormal"&gt;Page.ClientScript.RegisterForEventValidation(ddlState.UniqueID, "AK");&lt;br /&gt;&lt;span style=""&gt;&lt;/span&gt;Page.ClientScript.RegisterForEventValidation(ddlState.UniqueID, "&lt;st1:place st="on"&gt;&lt;st1:state st="on"&gt;AL&lt;/st1:State&gt;&lt;/st1:place&gt;");&lt;br /&gt;&lt;span style=""&gt;&lt;/span&gt;Page.ClientScript.RegisterForEventValidation(ddlState.UniqueID, "CA");&lt;/p&gt;And so forth ...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You may also want to consider the following as another workaround:&lt;br /&gt;(Check the following article for more details: &lt;a href="http://msdn2.microsoft.com/en-us/library/w1sw53ds.aspx"  target="blank"&gt;http://msdn2.microsoft.com/en-us/library/w1sw53ds.aspx&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;1)If you want to display strings in your application but do not trust them, apply HTML encoding to them when the strings are written back in a response. For example, with encoding, the tag b becomes &amp;lt;b&amp;gt;. You might do this if the strings that you are displaying are from a database whose contents you are not sure that you can trust.&lt;br /&gt;&lt;br /&gt;2)If you want your application to accept some HTML (for example, some formatting instructions from users), you should encode the HTML at the client before it is submitted to the server.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@Copyright 2006, Isaac Levy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-1914687387602708546?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/1914687387602708546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=1914687387602708546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/1914687387602708546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/1914687387602708546'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2006/11/registerforeventvalidation-and-event.html' title='RegisterForEventValidation and event validation'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-2683995772772474738</id><published>2006-11-09T00:54:00.000-08:00</published><updated>2006-11-09T00:57:12.412-08:00</updated><title type='text'>Cool Mouse Over Effects</title><content type='html'>&lt;table&gt;&lt;br /&gt;   &lt;tr&gt;&lt;br /&gt;    &lt;td valign="top"&gt;&lt;br /&gt;     &lt;table width="700"&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;       &lt;td valign="top"&gt;&lt;br /&gt;        &lt;P&gt;Ever wanted to show a popup information window when the mouse rolls over an &lt;br /&gt;         image, a grid cell, a hyper link or any other UI control?&lt;br /&gt;         &lt;br&gt;&lt;br /&gt;         In this article we display a table (window) when the user rolls over an ASP.NET &lt;br /&gt;         server-side control.&lt;/P&gt;&lt;br /&gt;        &lt;P&gt;The window to display is contained in a "div" tag. The content of the "div" tag &lt;br /&gt;         may be changed at runtime using the javascript "innerHtml" property. These will &lt;br /&gt;         be described later.&lt;br /&gt;         &lt;br&gt;&lt;br /&gt;         First, We need to define a style for the "div" tag. The style could be defined &lt;br /&gt;         within the html HEAD tags as follows:&lt;br /&gt;         &lt;br&gt;&lt;br /&gt;         &lt;textarea rows="5" cols="80"&gt;  &amp;lt;STYLE&amp;gt;&lt;br /&gt;#rollover { position: absolute; left: 0; top: 0; Z-INDEX: 101;}&lt;br /&gt;  &amp;lt;/STYLE&amp;gt;&lt;br /&gt;         &lt;/textarea&gt;&lt;br&gt;&lt;br /&gt;         Above &lt;FONT face="Arial"&gt;position:absolute&lt;/FONT&gt; is necessary. The position of &lt;br /&gt;         the &amp;lt;div&amp;gt; tag will change as we move the mouse over different controls. &lt;FONT face="Arial"&gt;&lt;br /&gt;          position:absolute position&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="Times New Roman"&gt;insures &lt;br /&gt;          the div will be positioned at the new location.&lt;/FONT&gt;&lt;/P&gt;&lt;br /&gt;        &lt;P&gt;Next we define two javascript functions for showing and hiding the div:&lt;/P&gt;&lt;br /&gt;        &lt;textarea rows="30" cols="80" ID="Textarea1" NAME="Textarea1"&gt; &lt;br /&gt;&amp;lt;script language="javascript"&amp;gt;&lt;br /&gt;   function showimage(info)&lt;br /&gt;  {&lt;br /&gt;  var xpos;&lt;br /&gt;  var z = document.all.rollover.style;&lt;br /&gt;  xpos =  window.event.x + (64-((window.event.x-39)%64)); &lt;br /&gt;&lt;br /&gt;  z.pixelLeft  = xpos;  &lt;br /&gt;  z.pixelTop = window.event.y;&lt;br /&gt;&lt;br /&gt;  rollover.innerHTML = "&amp;lt;table class='CineCritBody' border=1 bordercolor='green'&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td nowrap class='CineCritHeader'&amp;gt;"+unescape(info)+"&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;";&lt;br /&gt;  z.visibility="visible"&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  function hideimage()&lt;br /&gt;  {&lt;br /&gt;  var image0;&lt;br /&gt;  image0 = document.getElementById('rollover');&lt;br /&gt;  if (image0)&lt;br /&gt;   image0.style.visibility="hidden";&lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt;&amp;lt;/script&amp;gt;  &lt;br /&gt;        &lt;/textarea&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        Above the showimage() function will be called on the onmouseover event. &lt;br /&gt;        window.event.x and window.event.y specify the location of the mouse during the &lt;br /&gt;        onmouseover event.&lt;br&gt;&lt;br /&gt;        The coordinates of the "div" will be set using the x, y mouse location. To the &lt;br /&gt;        mouse x location we simply add extra space so that the window will be displayed &lt;br /&gt;        a bit to the right of our control.&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        The content of the "div" is changed using the innerHTML attribute as follows:&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        &lt;textarea rows="6" cols="100"&gt;rollover.innerHTML = "&amp;lt;table class='CineCritBody' border=1 bordercolor='green'&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td nowrap class='CineCritHeader'&amp;gt;"+unescape(info)+"&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;";&lt;br /&gt;        &lt;/textarea&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        Next, In the .ASPX file define your rollover div tag:&lt;br&gt;&lt;br /&gt;        &lt;textarea rows="6" cols="40" ID="Textareadiv" NAME="Textarea2"&gt;&amp;lt;DIV ID="rollover"&amp;gt;&amp;lt;/DIV&amp;gt;&lt;br /&gt;        &lt;/textarea&gt;&lt;br&gt;&lt;br /&gt;        Next, we need to program our asp.net server side control to respond to &lt;br /&gt;        javascript client-side events. This would be done on the server side. For &lt;br /&gt;        example in C#:&lt;br&gt;&lt;br /&gt;        &lt;textarea rows="6" cols="80" ID="Textarea2" NAME="Textarea2"&gt;&lt;br /&gt;  MyServerControl1.Attributes.Add("onmouseover", "showimage('"+strtitle +"')");&lt;br /&gt;  MyServerControl1.Attributes.Add("onmouseout", "hideimage()"); &lt;br /&gt;  &lt;br /&gt;        &lt;/textarea&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        Above we program our server control, MyServerControl1, to respond to the &lt;br /&gt;        client-side&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        onmouseover and onmouseout events. To the showimage function we pass strTitle &lt;br /&gt;        which is the text we want to display in the window. The info is displayed using &lt;br /&gt;        innerHTML attribute as described above.&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;       &lt;td class="Copy"&gt;&lt;br&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        &lt;br&gt;&lt;br /&gt;        &lt;p&gt;Copyright @ Isaac Levy, Los Angeles, CA&lt;br /&gt;         &lt;br&gt;&lt;br /&gt;         (Author's Email: RisingDeepStar@yahoo.com)&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;     &lt;/table&gt;&lt;br /&gt;    &lt;/td&gt;&lt;br /&gt;    &lt;td width="20"&gt;&lt;/td&gt;&lt;br /&gt;    &lt;td valign="top"&gt;&lt;br /&gt;     &lt;br /&gt;    &lt;/td&gt;&lt;br /&gt;   &lt;/tr&gt;&lt;br /&gt;  &lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-2683995772772474738?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/2683995772772474738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=2683995772772474738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/2683995772772474738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/2683995772772474738'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2006/11/cool-mouse-over-effects.html' title='Cool Mouse Over Effects'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3138839697687622047.post-7718779403682098361</id><published>2006-11-09T00:45:00.000-08:00</published><updated>2006-11-09T00:47:57.982-08:00</updated><title type='text'>Simulating Return Key</title><content type='html'>Place this code on page load where buttonID is the ID of the button or image that you want to associate with the Form's return key. On pressing the return key the onclick event for the button is executed.&lt;br /&gt;&lt;br /&gt;Page.RegisterHiddenField("__EVENTTARGET", buttonID);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3138839697687622047-7718779403682098361?l=dotnetscribbles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetscribbles.blogspot.com/feeds/7718779403682098361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3138839697687622047&amp;postID=7718779403682098361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/7718779403682098361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3138839697687622047/posts/default/7718779403682098361'/><link rel='alternate' type='text/html' href='http://dotnetscribbles.blogspot.com/2006/11/simulating-return-key.html' title='Simulating Return Key'/><author><name>Isaac</name><uri>http://www.blogger.com/profile/10214534177134862181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
