<?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-3350596475772680700</id><updated>2011-12-23T12:45:05.423-05:00</updated><category term='jQuery basics /Simple Animations'/><category term='Java Script for Web Designers'/><category term='jQuery basics / Working with Elements:'/><category term='JQuery MAster Page ASP.NET'/><category term='.NET exception throw'/><title type='text'>Sevtopolis Design</title><subtitle type='html'>web strategy and development company</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sevtopolis.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sevtopolis.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sevtopolis Blog</name><uri>http://www.blogger.com/profile/17458351193464712607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_LmldToqO5fo/TQVRe9d9ElI/AAAAAAAAAAM/N0Us30flB3s/S220/154538_466902664555_704964555_5303979_4361809_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3350596475772680700.post-7438502127658036467</id><published>2011-12-20T14:05:00.005-05:00</published><updated>2011-12-23T12:45:05.429-05:00</updated><title type='text'>Navigation Bar Best Practices</title><content type='html'>Navigation links placement on your website plays a big role. Avoiding navigational confusion is an extremely important part of website usability. Here are the basic characteristics of a good navigation bar:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Navigation bar should be consistent throughout the site, no matter if you choose to use a horizontal, vertical navigation bar or both. Give the user what they expect. Avoid confusion! Or else the visitors could become extremely frustrated and never want to return to your website again.&lt;/li&gt;&lt;li&gt;Make the primary navigation stand out by using graphics or different links style, but keep it simple. Do not overwhelm the user with complicated designs,&amp;nbsp;no matter how cool it might be.&amp;nbsp;Avoid using strictly images with no text, because people interpret images differently.&lt;/li&gt;&lt;li&gt;Try using text links that contain keywords and avoid flash menus.&amp;nbsp;The labels should be descriptive so that visitors will find exactly what they’re expecting to find when they click on a hyperlink. Evaluate your content thoroughly and ask yourself what information or product your users need to access quickly.&lt;br /&gt;The navigation should be flexible enough to accommodate any amount of additional links as required.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Consider using "Call to Action Buttons" for some of the most- important links, instead including them in the menu. Such as: "Donate", "Learn "Shop Now", "Get Started", "Get a Quote".&lt;br /&gt;Make the button as large as possible while keeping it professional looking.&amp;nbsp;Putt ample amounts of white space around the them for better&amp;nbsp;&lt;/li&gt;&lt;li&gt;Provide visual Clues about what page are you on or the pages you have visited. For instance change the color of the tab, or add an image.&lt;br /&gt;Use "bread crumbs" for larger websites. "Bread crumbs" can greatly enhance the way users find their location within the website’s hierarchy.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3350596475772680700-7438502127658036467?l=sevtopolis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sevtopolis.blogspot.com/feeds/7438502127658036467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sevtopolis.blogspot.com/2011/12/navigation-bar-best-practices.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/7438502127658036467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/7438502127658036467'/><link rel='alternate' type='text/html' href='http://sevtopolis.blogspot.com/2011/12/navigation-bar-best-practices.html' title='Navigation Bar Best Practices'/><author><name>Sevtopolis Blog</name><uri>http://www.blogger.com/profile/17458351193464712607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_LmldToqO5fo/TQVRe9d9ElI/AAAAAAAAAAM/N0Us30flB3s/S220/154538_466902664555_704964555_5303979_4361809_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350596475772680700.post-2577709016886990073</id><published>2010-12-07T17:51:00.009-05:00</published><updated>2010-12-13T11:58:56.621-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Script for Web Designers'/><title type='text'>Java Script for Web Designers- Part 1 Variables</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Why Variables are useful&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Variables are used to hold values. The value can be changed at any time and this will lead to changes in something that happens in the script.Variables are useful because they can save you time in writing your script and will simplify the code.&lt;br /&gt;They can also be used to hold a value that will be input by the user.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Naming Variables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can give variables a meaningful names so they can be easily recognized when you comeback later to your script.&lt;br /&gt;Variables are case sensitive and the name must begin with a letter or underscore. The other characters can be letters, numbers and underscores.&lt;br /&gt;Blank spaces are not allowed.&lt;br /&gt;Another rule to keep in mind is to avoid using java script reserved words for instance false, float, boolean , break...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Variably types:&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Numbers&lt;/span&gt;: just numbers that will remain the same unless you perform some sort of calculation. If the value is a big number an exponential notation can be used.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;String&lt;/span&gt;:represents a strung of text, numbers or just about anything. string needs to be placed inside quotation marks. Special characters such as tabs(\t or \v for vertical), quotation marks (\" or \') , backslash(\\) or newline (\n) can be used. They all begin with (\)&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Boolean&lt;/span&gt;: they are useful when you need a variable that can only have values of true or fals. Instead of using the words true or falls you can use the number 1 for true and 0 for false.&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;var likecoffee=true&lt;br /&gt;var likeicecream=false&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Null:&lt;/span&gt; means that the variable has no value. Null is not a zero it is simply nothing. Useful when you test for input in script&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Here is an example of using Variables in script:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;var bikecolor="green";&lt;br /&gt;var NewString="every day";&lt;br /&gt;document.write("I like to ride my"+bikecolor+"bicycle"+NewString);&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The code prints the sentence in the browser:&lt;br /&gt;I like to ride my green bicycle every day&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3350596475772680700-2577709016886990073?l=sevtopolis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sevtopolis.blogspot.com/feeds/2577709016886990073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sevtopolis.blogspot.com/2010/12/variables-are-used-to-hold-values.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/2577709016886990073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/2577709016886990073'/><link rel='alternate' type='text/html' href='http://sevtopolis.blogspot.com/2010/12/variables-are-used-to-hold-values.html' title='Java Script for Web Designers- Part 1 Variables'/><author><name>Sevtopolis Blog</name><uri>http://www.blogger.com/profile/17458351193464712607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_LmldToqO5fo/TQVRe9d9ElI/AAAAAAAAAAM/N0Us30flB3s/S220/154538_466902664555_704964555_5303979_4361809_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350596475772680700.post-1642204605741509953</id><published>2010-06-11T14:30:00.025-04:00</published><updated>2011-12-20T15:04:42.481-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery basics /Simple Animations'/><title type='text'>Essential jQuery/Simple Animations:</title><content type='html'>This article contains 3 tutorials on how to create simple animation effects using the functions:  Animate, SlideToggle, FadeIn and FadeOut&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;1). Animate: Description: &lt;/h3&gt;&lt;h4&gt; .animate( [ duration ], [ easing ], [ callback ] )&lt;/h4&gt; A map of CSS properties that the animation will move toward.&lt;br /&gt;Duration: A string or number determining how long the animation will run.&lt;br /&gt;Easing: A string indicating which easing function to use for the transition.&lt;br /&gt;Callback: A function to call once the animation is complete. &lt;a href="http://api.jquery.com/animate/"&gt;Read More&lt;/a&gt;&lt;br /&gt;&lt;h4&gt;Tutorial 1:&lt;/h4&gt;&lt;p&gt;In this example we have created a simple HTML page with 3 images. When we click on one of these images they will all shift to the left and then the width is re sized. &lt;a href="http://www.sevtopolis.com/BLOG_examples/JQ_03_animate01.htm"&gt; Live Demo&lt;/a&gt;&lt;/p&gt;&lt;pre class="brush: html"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;$(document).ready(function(){&lt;br /&gt;$("img").click(function(){&lt;br /&gt;$("img").animate({"left":"500px"},"4000");&lt;br /&gt;$("img").animate({"width":"300px"},"4000");&lt;br /&gt;});&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="brush:html"&gt;&amp;lt;p&amp;gt;&amp;lt;img src="image1.gif" alt="Image1" style="position:relative;"/&amp;gt;&amp;lt;/p&amp;gt; &amp;lt;!--The image&lt;br /&gt;needs to be possitioned --&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;img src="image2.gif" alt="Image2" style="position:relative;"/&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;img src="image3.gif" alt="Image3" style="position:relative;"/&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now instead of $("img")we will use $(this)and only the image that was clicked will be shifted and re-sized.("this" is referring only to the element that caused the event). &lt;a href="http://www.sevtopolis.com/BLOG_examples/JQ_03_animate02.htm"&gt;Live Demo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;$(function(){&lt;br /&gt;$("img").click(function(){&lt;br /&gt;$(this).animate({"left":"500px"},"3000");&lt;br /&gt;$(this).animate({"width":"300px"},"3000");&lt;br /&gt;});&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;2). SlideToggle: Description&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;.slideToggle( [ duration ], [ callback ] )&lt;/h4&gt;&lt;br /&gt;Duration: Determine how long the animation will run.&lt;br /&gt;Callback: A function to call once the animation is complete.&lt;br /&gt;The .slideToggle() method animates the height of the matched elements. This causes lower parts of the page to slide up or down, appearing to reveal or conceal the items. If the element is initially displayed, it will be hidden; if hidden, it will be shown.&lt;br /&gt;&lt;a href="http://api.jquery.com/slideToggle/"&gt;Read More&lt;/a&gt;&lt;br /&gt;&lt;h4&gt;Tutorial 2:&lt;/h4&gt;&lt;a href="http://www.sevtopolis.com/BLOG_examples/JQ_03_animate03.htm"&gt;Live Demo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;$(function(){&lt;br /&gt;$(".btn").click(function(){&lt;br /&gt;$("#panel").slideToggle("slow"); &amp;lt;!--With the element initially hidden (in this case: #panel),&lt;br /&gt;we can show it slowly when we click on an element with class btn.--&amp;gt;&lt;br /&gt;$(this).toggleClass("active");&lt;br /&gt;});&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;.btn&lt;br /&gt;{&lt;br /&gt;border-style: solid;&lt;br /&gt;border:solid 1px #954A23;&lt;br /&gt;background-color: #B83103;&lt;br /&gt;padding: 5px 35px;&lt;br /&gt;color: #fff;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#panel {&lt;br /&gt;background-color:#B83103;&lt;br /&gt;height: 80px;&lt;br /&gt;width:350px;&lt;br /&gt;padding:50px 0 0 80px;&lt;br /&gt;display:none;&lt;br /&gt;color: #fff;&lt;br /&gt;font-size:26px;&lt;br /&gt;}&lt;br /&gt;style&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&amp;lt;div id="panel"&amp;gt;Welcome to our Website&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;a href="#" class="btn"&amp;gt;Slide Panel&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;3). Fade In Fade Out: Description&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;.fadeIn and  .fadeOut( [ duration ], [ callback ] )&lt;/h4&gt;&lt;br /&gt;The .fadeIn().fadeOut()  method animates the opacity of the matched elements.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Tutorial 3:&lt;/h4&gt;.&lt;a href="http://www.sevtopolis.com/BLOG_examples/JQ_03_animate04.htm"&gt;Live Demo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:html"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;$(function(){&lt;br /&gt;$('img').hide();&lt;br /&gt;&lt;br /&gt;$('#link1').click(function(){&lt;br /&gt;$('p').fadeOut(2500);&lt;br /&gt;$('#image1').fadeIn(2500);&lt;br /&gt;$('#image2').fadeOut(2500);&lt;br /&gt;$('#image3').fadeOut(2500);&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;$("#link2").click(function(){&lt;br /&gt;$('p').fadeOut(1500);&lt;br /&gt;$('#image1').fadeOut(1500);&lt;br /&gt;$('#image2').fadeIn(1500);&lt;br /&gt;$('#image3').fadeOut(1500);&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;$("#link3").click(function(){&lt;br /&gt;$('p').fadeOut(1500);&lt;br /&gt;$('#image1').fadeOut(1500);&lt;br /&gt;$('#image2').fadeOut(1500);&lt;br /&gt;$('#image3').fadeIn(1500);&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:html"&gt;&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;#panel{&lt;br /&gt;float:left;&lt;br /&gt;width:400px;&lt;br /&gt;}&lt;br /&gt;#nav{&lt;br /&gt;float:left;&lt;br /&gt;width:200px;&lt;br /&gt;}&lt;br /&gt;#image1,#image2, #image3{&lt;br /&gt;position:absolute; &amp;lt;!--Note: The images needs to be positioned in order to appear&lt;br /&gt;at the top of the page.--&amp;gt;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:html"&gt;&amp;lt;ul id="nav"&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;&amp;lt;a id="link1" href="#" title="click"&amp;gt;Show Image1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;&amp;lt;a id="link2" href="#" title="click"&amp;gt;Show Image2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;&amp;lt;a id="link3" href="#" title="click"&amp;gt;Show image3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id="panel"&amp;gt;&lt;br /&gt;&amp;lt;img id="image1" src="image1.gif" alt="Image1"/&amp;gt;&lt;br /&gt;&amp;lt;img id="image2" src="image2.gif" alt="Image2"/&amp;gt;&lt;br /&gt;&amp;lt;img id="image3" src="image3.gif" alt="Image3"/&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Some text here&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3350596475772680700-1642204605741509953?l=sevtopolis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sevtopolis.blogspot.com/feeds/1642204605741509953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sevtopolis.blogspot.com/2010/06/simple-animations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/1642204605741509953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/1642204605741509953'/><link rel='alternate' type='text/html' href='http://sevtopolis.blogspot.com/2010/06/simple-animations.html' title='Essential jQuery/Simple Animations:'/><author><name>Sevtopolis Blog</name><uri>http://www.blogger.com/profile/17458351193464712607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_LmldToqO5fo/TQVRe9d9ElI/AAAAAAAAAAM/N0Us30flB3s/S220/154538_466902664555_704964555_5303979_4361809_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350596475772680700.post-3089865771130177157</id><published>2010-06-02T10:46:00.016-04:00</published><updated>2011-12-20T15:06:46.585-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery basics / Working with Elements:'/><title type='text'>Essential jQuery/ Working with Elements</title><content type='html'>&lt;h3&gt;&lt;br /&gt;1. Appending Content to Element&lt;/h3&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;title&amp;gt;Appending Text to Element&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;function addContent(){&lt;br /&gt;  $("p").append("&amp;lt;b&amp;gt; Hello! How are you?&amp;lt;/b&amp;gt;");&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;Appending Text to Element&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;There is a message for you&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form&amp;gt;&lt;br /&gt;&amp;lt;input type="button" value="see the message" onclick="addContent()"&amp;gt;&amp;lt;/input&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;2. Loading HTML document into an Element&lt;/h3&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Loading HTML doument into an Element&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;$(document).ready(function() {&lt;br /&gt;  $('#ourcontent').click(function(){&lt;br /&gt;      $(this).load('document.htm');&lt;br /&gt;  }); &lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;div id="ourcontent"&amp;gt;click me&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;First paragraph&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Secont paragraph &amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Third paragraph &amp;lt;/p&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;/pre&gt;The HTML above will be used for the next two examples as well&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;3. Generating new HTML&lt;/h3&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;$(document).ready(function() {&lt;br /&gt; $('#ourcontent').click(function(){&lt;br /&gt;   $("&amp;lt;div id='coffee'&amp;gt;I love coffe&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;I don't&amp;lt;/div&amp;gt;")&lt;br /&gt;      .filter("#coffee").click(function() {&lt;br /&gt;          alert("coffee lovers only");&lt;br /&gt;&lt;br /&gt;   }) .end().appendTo("p");&lt;br /&gt; });&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Explanation: We first created two div elements (one with an id “coffee”). Then we narrow down the selection only the to div with id “coffee” and add an event handler to it that will fire an alert when clicked.&lt;br /&gt;Finlay we have used end() method to go back to the set of div and append them to the p elements of the page.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;&lt;br /&gt;4. Moving Elements&lt;/h3&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;$(document).ready(function() {&lt;br /&gt;$('#ourcontent').click(function(){&lt;br /&gt;    $('p:last').append($('p:first'));&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;5. Wrapping elements&lt;/h3&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;$(document).ready(function(){&lt;br /&gt;  $('#ourcontent').click(function(){&lt;br /&gt;      function wrapper(){&lt;br /&gt;      $("p").wrap("&amp;lt;h1&amp;gt;&amp;lt;/h1&amp;gt;")&lt;br /&gt;      };&lt;br /&gt;  }); &lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3350596475772680700-3089865771130177157?l=sevtopolis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sevtopolis.blogspot.com/feeds/3089865771130177157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sevtopolis.blogspot.com/2010/06/working-with-elements-1.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/3089865771130177157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/3089865771130177157'/><link rel='alternate' type='text/html' href='http://sevtopolis.blogspot.com/2010/06/working-with-elements-1.html' title='Essential jQuery/ Working with Elements'/><author><name>Sevtopolis Blog</name><uri>http://www.blogger.com/profile/17458351193464712607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_LmldToqO5fo/TQVRe9d9ElI/AAAAAAAAAAM/N0Us30flB3s/S220/154538_466902664555_704964555_5303979_4361809_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350596475772680700.post-7814713271977701206</id><published>2010-05-07T15:53:00.029-04:00</published><updated>2010-06-02T11:17:50.629-04:00</updated><title type='text'>Essential jQuery / Selecting Elements</title><content type='html'>&lt;p&gt;To verify that we have selected a particular element we will turn its background to red by clicking on a button “Stripe”&lt;br /&gt;Here is a simple HTML Page that will be used throughout this post:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;&lt;br /&gt;&amp;lt;head &amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;function stripe(){&lt;br /&gt;    $('#paragraph3')&lt;br /&gt;        .addClass('NewClass');&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;style&amp;gt;&lt;br /&gt;p.NewClass{background-color:red;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;Selecting Elements:&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt; This is a paragraph 1.&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt; This is a paragraph 2.&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p id="paragraph3"&amp;gt; This is a paragraph 3.&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p class="paragraph4"&amp;gt; This is a paragraph 4.&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form&amp;gt;&amp;lt;input type="button" value="Srtipe" onclick="stripe()"&amp;gt;&amp;lt;/input&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;1. Selecting by ID:&lt;br /&gt;&lt;/h3&gt;In this example we have selected the third paragraph by calling the function &amp;amp;(#id), which returns an element with the same ID. We have changed the background by adding a class to the selected element. ( toggleClass() function can be used instead of addClass)&lt;br /&gt;&lt;h3&gt;2. Selecting by Class:&lt;/h3&gt;&lt;pre class="brush: html"&gt;function stripe(){&lt;br /&gt;$('.paragraph4') &lt;!--sellects only the element with the same sclass--&gt;&lt;br /&gt;.toggleClass('striped');&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;3. Selecting a Set of Elements:  &lt;/h3&gt; &lt;pre class="brush: html"&gt;function stripe(){&lt;br /&gt;$('p')   &lt;!--sellects all paragraph elements throaut the page--&gt;&lt;br /&gt;.toggleClass('striped');&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;4. Selecting the First or the Last of a Set of Elements / or both&lt;/h3&gt;&lt;pre class="brush: html"&gt;function stripe(){&lt;br /&gt;$('p:first')   &lt;!--sellects only the first paragraph--&gt;&lt;br /&gt;.toggleClass('striped');&lt;br /&gt;}&lt;/pre&gt;There is also a selector that selects the last of a Set of elements: $('p:last')&lt;br /&gt;If you would like to select the first and the last elements:&lt;br /&gt;&lt;pre class="brush: html"&gt;&lt;br /&gt;function stripe(){&lt;br /&gt;$('p:first')&lt;br /&gt;.addClass('striped');&lt;br /&gt;$('p:last')&lt;br /&gt;.addClass('striped');&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;5. Selecting elements with specific text:&lt;/h3&gt;&lt;pre class="brush: html"&gt;&lt;br /&gt;function stripe(){&lt;br /&gt;$('p:contains("2")')&lt;br /&gt;.addClass('striped');;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;6. Not() Selectors&lt;/h3&gt;:not(selector) Removes all elements matching the specific selector.For instance in this example all the paragraphs will be selected but not the paragraph with the specified ID&lt;br /&gt;&lt;pre class="brush: html"&gt;&lt;br /&gt;function stripe(){&lt;br /&gt;&lt;br /&gt;$(':not(#paragraph3)')&lt;br /&gt;.addClass('striped');&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;7.Selecting Elements that are Headers ( h1, h2…)&lt;/h3&gt;&lt;br /&gt;&lt;pre class="brush: html"&gt;function stripe(){&lt;br /&gt;$(":header")&lt;br /&gt;.addClass('striped');&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;8. List of Selector  is available &lt;a href="http://api.jquery.com/category/selectors/"&gt;Here&lt;/a&gt;&lt;br /&gt;&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3350596475772680700-7814713271977701206?l=sevtopolis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sevtopolis.blogspot.com/feeds/7814713271977701206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sevtopolis.blogspot.com/2010/05/selecting-elements-to-verify-that-we.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/7814713271977701206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/7814713271977701206'/><link rel='alternate' type='text/html' href='http://sevtopolis.blogspot.com/2010/05/selecting-elements-to-verify-that-we.html' title='Essential jQuery / Selecting Elements'/><author><name>Sevtopolis Blog</name><uri>http://www.blogger.com/profile/17458351193464712607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_LmldToqO5fo/TQVRe9d9ElI/AAAAAAAAAAM/N0Us30flB3s/S220/154538_466902664555_704964555_5303979_4361809_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350596475772680700.post-3099095849862748418</id><published>2010-04-15T23:20:00.025-04:00</published><updated>2010-05-07T17:14:26.670-04:00</updated><title type='text'>CSS must know tricks</title><content type='html'>&lt;h3&gt;&lt;br /&gt;1. Hiding text under Image .&lt;/h3&gt;&lt;br /&gt;&lt;div id="DivName"&gt;&lt;br /&gt;&amp;lt;h1&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;Our Services:&amp;lt;/h1&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The Span inside the h1 element give us an element to which we can apply a background. Positioning the span absolutely moves it from the documents flow and the HTML text can flow underneath it.&lt;/p&gt;&lt;p&gt;If the HTML text grows beyond the image, It will peek out from behind the image. For this reason we make the width of the text and the image exactly the same and set the overflow to “hidden”. In this case the width is set to 100% so that the span and the text automatically expand.&lt;/p&gt;&lt;br /&gt;h1&lt;br /&gt;{&lt;br /&gt;position: relative;&lt;br /&gt;height: 60px;&lt;br /&gt;width: 100%;&lt;br /&gt;overflow:hidden;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;h1 span&lt;br /&gt;{&lt;br /&gt;position: absolute;&lt;br /&gt;left: 0px;&lt;br /&gt;top: 0px;&lt;br /&gt;height: 60px;&lt;br /&gt;width: 100%;&lt;br /&gt;background-image: url(../images/services.jpg);&lt;br /&gt;background-repeat: no-repeat;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;h3&gt;&lt;/h3&gt;&lt;h3&gt;Hiding text under Image using text indent.&lt;/h3&gt;&lt;br /&gt;&amp;lt;h1&amp;gt;Our Services:&amp;lt;/h1&amp;gt;&lt;br /&gt;h1&lt;br /&gt;{&lt;br /&gt;height: 60px;&lt;br /&gt;background: url(../images/services.jpg) no-repeat;&lt;br /&gt;overflow:hidden;&lt;br /&gt;text-indent: -9999px;&lt;br /&gt;}&lt;br /&gt;&lt;p&gt;There is a disadvantage of text-indent image replacement: if the image does not display, there will be a gap in the page.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;2. Rounded Corners and a Drop Shadow in CSS.&lt;/h3&gt;&lt;p&gt;&lt;br /&gt;Here is an example on how to style a Submit Button with rounded corners and a drop shadow in Pure CSS. Unfortunately it does not work on IE ( We have set different with and color borders to create an “outset effect” to add a visual interest in IE) .&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.sevtopolis.com/contact.aspx"&gt;Click Here for Live Demo &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;.Submit_btn&lt;br /&gt;{&lt;br /&gt;padding: 6px 45px;&lt;br /&gt;border-style: solid;&lt;br /&gt;border-width: 1px 1px 2px 2px;&lt;br /&gt;border-color: #AA5628 #70381B #70381B #AA5628;&lt;br /&gt;background-color: #954A23;&lt;br /&gt;display: inline-block;&lt;br /&gt;font-family: Georgia;&lt;br /&gt;font-size: 17px;&lt;br /&gt;text-shadow: 0 -1px 2px rgba(0,0,0,0.5);&lt;br /&gt;cursor: pointer;&lt;br /&gt;color: #fff;&lt;br /&gt;text-decoration: none;&lt;br /&gt;font-weight: bold;&lt;br /&gt;-moz-border-radius: 10px;&lt;br /&gt;-webkit-border-radius: 10px;&lt;br /&gt;-moz-box-shadow: 2px 2px 4px rgba(0,0,0,0.3);&lt;br /&gt;-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p&gt;.Submit_btn:hover&lt;br /&gt;{&lt;br /&gt;background-color: #733415;&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;3. Transparency settings for all browsers.&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;To cover all your bases, you need four separate CSS statements.&lt;/p&gt;&lt;p&gt;#DivTransparent &lt;/p&gt;&lt;p&gt;{&lt;br /&gt;filter:alpha(opacity=50); /*.....needed for IE.....*/&lt;br /&gt;-moz-opacity:0.5; /*.....old versions of the Mozilla browsers.....*/&lt;br /&gt;-khtml-opacity: 0.5; /*.....old versions of Safari .....*/&lt;br /&gt;opacity: 0.5; /*.....most versions of Firefox, Safari, and Opera.....*/&lt;br /&gt;} &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;h3&gt;4. Transparent PNG in IE 6.&lt;/h3&gt;&lt;p&gt;Newer browser such as Firefox and Safari have offered support for PNG images with full alpha channel transparency, dealing with transparent png’s in IE 6 is a real headache.&lt;br /&gt;Besides the color information each pixel in the PNG file also carries a separate alpha channel of information on how transparent it is. Unfortunately IE does not fully support this alpha channel transparency.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;img {&lt;br /&gt;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(...);&lt;br /&gt;}&lt;br /&gt;The AlphaImageLoader does not work for tiled and positioned background (background-repeat or background-position)&lt;br /&gt;Read more here:&lt;br /&gt;&lt;a href="http://code.google.com/p/ie7-js/"&gt;http://code.google.com/p/ie7-js/&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;5. Minimum height in all browsers. &lt;/h3&gt;&lt;p&gt;Sometime we need an element to have at least a certain height, and then stretch to accommodate more content. Unfortunately IE doest render the min-height property correctly! &lt;/p&gt;&lt;p&gt;&lt;br /&gt;#divName {&lt;br /&gt;min-height:500px;&lt;br /&gt;height:auto !important;&lt;br /&gt;height:500px&lt;br /&gt;} &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;6. IE Double Float Margin Bugs.&lt;/h3&gt;&lt;p&gt;A floated element with a given margin suddenly has doubled the margin in IE 6.&lt;br /&gt;By changing the display of the floated element to “inline” can fix the problem: &lt;/p&gt;&lt;p&gt;&lt;br /&gt;#DivFloat {&lt;br /&gt;float:left;&lt;br /&gt;width: 400px;&lt;br /&gt;margin: 10px;&lt;br /&gt;display: inline; } &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;7. Specificity Rules.&lt;/h3&gt;&lt;p&gt;Specificity determines, which CSS rule is applied by browsers. “Specificity is a type of weighting that has a bearing on how your cascading style sheet (CSS) rules are displayed.” [Understanding Specificity] &lt;a href="http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/"&gt;Click Here to Read More&lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3350596475772680700-3099095849862748418?l=sevtopolis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sevtopolis.blogspot.com/feeds/3099095849862748418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sevtopolis.blogspot.com/2010/04/css-must-know-tricks-1.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/3099095849862748418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/3099095849862748418'/><link rel='alternate' type='text/html' href='http://sevtopolis.blogspot.com/2010/04/css-must-know-tricks-1.html' title='CSS must know tricks'/><author><name>Sevtopolis Blog</name><uri>http://www.blogger.com/profile/17458351193464712607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_LmldToqO5fo/TQVRe9d9ElI/AAAAAAAAAAM/N0Us30flB3s/S220/154538_466902664555_704964555_5303979_4361809_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350596475772680700.post-3562985935685994441</id><published>2009-12-08T22:09:00.012-05:00</published><updated>2009-12-17T21:34:31.016-05:00</updated><title type='text'>Is your site ready for redesign?</title><content type='html'>&lt;p&gt;&lt;br /&gt;        Many organizations make a great effort to set up a website and then never bother&lt;br /&gt;        to re-evaluate their web site's design or position in the marketplace.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;br /&gt;        Looking at a website as an extension to the company’s brochure will put you at a&lt;br /&gt;        disadvantage sooner or later. Trends in website design change constantly. Modern&lt;br /&gt;        looking site in 2006 is going to look dull and outdated in 2010. And there is more.&lt;br /&gt;        An outdated site may turns visitors away.&lt;/p&gt;&lt;br /&gt;   &lt;br /&gt;        So how do you know if your site is ready for redesign?&lt;br/&gt;&lt;br /&gt;    &lt;ol&gt;&lt;br /&gt;        &lt;li&gt;The content of the website is outdated - “Content is the king”. The content should&lt;br /&gt;            be kept current at any cost. Even if the site is “Static” it needs updates so the&lt;br /&gt;            users find a reason to visit the site frequently and search engines put the site&lt;br /&gt;            higher in their ranks as a site with valuable new information.&lt;br /&gt; &lt;/li&gt;&lt;br /&gt;        &lt;li&gt;The website is not using a CMS - Your website should really be built using a content&lt;br /&gt;            management system (CMS). The one very good reason to do so is to separate design&lt;br /&gt;            and content. This separation will give you an option to keep the content of the&lt;br /&gt;            site up to date without recurring cost of repeated updates and deployments. Also&lt;br /&gt;            changing design at later stage will not affect the content of the site, thus saving&lt;br /&gt;            money on entering the old content in the new site.&lt;br /&gt; &lt;/li&gt;&lt;br /&gt;        &lt;li&gt;The website is too complex - If you site is getting too large with a lot of pages,&lt;br /&gt;            complex navigation and content you should really consider simplifying it. Cut the&lt;br /&gt;            number of pages to the absolute minimum you can possibly tolerate. Simplify navigation&lt;br /&gt;            and provide alternative pats to different tasks. On each page consider removing&lt;br /&gt;            or hiding any content that does not address the needs of your primary audience.&lt;br /&gt;        &lt;/li&gt;&lt;br /&gt;        &lt;li&gt;The site uses deprecated techniques like frames or Flash intro pages and tables&lt;br /&gt;            for layout - frames and flash intro pages have been out of the main stream for at&lt;br /&gt;            least a decade now. Even sites created entirely with flash are becoming more rear&lt;br /&gt;            since search engines have hard time searching the content of such sites.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;The website has low search engine rank - Search engine optimization (SEO) is crucial&lt;br /&gt;            of any website. By improving your search engine rating you'd increase the volume&lt;br /&gt;            an the quality of the traffic to the web site. While many SEO changes can be made&lt;br /&gt;            to existing sites, sometimes it might be time to start over. Table-based design&lt;br /&gt;            can hamper the sites rank since they generate so much extra content that ends up&lt;br /&gt;            overwhelming the search engines spiders. Streamlining your design and minimizing&lt;br /&gt;            you content can make your site rank higher in search engines. &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;The site is slow-Waiting for a page to render for more than second is not an option&lt;br /&gt;            anymore. We as Internet users have so many choices that are a click away, we have&lt;br /&gt;            no patients to wait. The rule of the game is: “No mater what you show just show&lt;br /&gt;            it quick”. Once user is on the page you need to make it as easy as possible to perform&lt;br /&gt;            the tasks that you want them to perform on your site, whether it’s to purchase a&lt;br /&gt;            product, read a particular article, or contact you. &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;The website is lagging behind competition – You should definitely make sure your&lt;br /&gt;            site does not look outdated compared to your competitors websites. It OK to postpone&lt;br /&gt;            your website redesign of all competitors do the same. But if they updated their&lt;br /&gt;            site recently and have a cool new features. You should really consider adding similar&lt;br /&gt;            features as well. That said you should not blindly copy their design and features,&lt;br /&gt;            but carefully consider a way to exceed the functionality they have by keeping the&lt;br /&gt;            site as simple as you possibly can. &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;    &lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3350596475772680700-3562985935685994441?l=sevtopolis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sevtopolis.blogspot.com/feeds/3562985935685994441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sevtopolis.blogspot.com/2009/12/is-your-site-ready-for-redesign.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/3562985935685994441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/3562985935685994441'/><link rel='alternate' type='text/html' href='http://sevtopolis.blogspot.com/2009/12/is-your-site-ready-for-redesign.html' title='Is your site ready for redesign?'/><author><name>Sevtopolis Blog</name><uri>http://www.blogger.com/profile/17458351193464712607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_LmldToqO5fo/TQVRe9d9ElI/AAAAAAAAAAM/N0Us30flB3s/S220/154538_466902664555_704964555_5303979_4361809_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350596475772680700.post-1369589409561124116</id><published>2009-11-10T11:09:00.011-05:00</published><updated>2010-05-07T17:15:17.945-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET exception throw'/><title type='text'>Throw the right Exception (.NET)</title><content type='html'>&lt;p&gt;&lt;br /&gt;   Throwing an exception is an important part of the exception handling process. Each&lt;br /&gt;   exception thrown in CLR or in your code will be eventually handled in the process&lt;br /&gt;   of code execution. In order to make exception handling more effective it is very&lt;br /&gt;   important to throw the exception that precisely describes the error.&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;   .Net framework has a rich exception class type hierarchy that should be used when&lt;br /&gt;   throwing an exception is considered. Although there are hundreds of classes in this&lt;br /&gt;   hierarchy most of the time, the exceptions you throw from within your methods should&lt;br /&gt;   be of type Argument Exception or InvalidOperationException, or an exception derived&lt;br /&gt;   from these types. The reason being almost all the time the exceptional situation&lt;br /&gt;   for a given method is caused by invalid arguments send via methods parameters.&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;   Following are the most commonly used classes derived from from ArgumentException.&lt;br /&gt;   &lt;/p&gt;&lt;ul&gt;&lt;br /&gt;       &lt;li&gt;ArgumentNullException&lt;/li&gt;&lt;br /&gt;       &lt;li&gt;ArgumentOutOfRangeException&lt;/li&gt;&lt;br /&gt;       &lt;li&gt;IInvalidEnumArgumentException&lt;/li&gt;&lt;br /&gt;   &lt;/ul&gt;&lt;br /&gt;   The ArgumentException and derived classes have a string property called "ParamName".&lt;br /&gt;   This property is set with the name of the parameter/argument that causes the code&lt;br /&gt;   to throw the exception.&lt;br /&gt;   &lt;pre class="brush: csharp"&gt;&lt;br /&gt;   throw new ArgumentNullException("user", "The user cannot be null.");&lt;br /&gt;   &lt;/pre&gt;&lt;br /&gt;    Choosing the right exception type is important but even more important is&lt;br /&gt;   to write a message that describes the exception precisely. The exception type is&lt;br /&gt;   used mostly if some were in the code exists a catch section that checks for a given&lt;br /&gt;   type and makes a decision based on the type of the exception.&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;    There are legitimate reasons to throw an exception from within the catch section&lt;br /&gt;   in the "try catch" block. One scenario is to wrap an exception inside&lt;br /&gt;   another exception. Another scenario is to replace a specific exception with more&lt;br /&gt;   generic exception to prevent exposing of a sensitive information. The third scenario&lt;br /&gt;   is to log an exception and throw it back again to be handled by the normal application&lt;br /&gt;   process.&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;   The type of the thrown exception from within catch section depends of the type of&lt;br /&gt;   the situation you are trying to handle, but in general rule is when wrapping an&lt;br /&gt;   exception to add the original exception as InnerException and when replacing the&lt;br /&gt;   exception leave the InnerException empty.&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;     // database access can fail&lt;br /&gt;   }&lt;br /&gt;   catch (SqlException ex)&lt;br /&gt;   {&lt;br /&gt;     // do some local cleanup here&lt;br /&gt;     throw new DataAccessException("Invalid SQL operation", ex);&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;   It is important here to mention the difference between "throw" and "throw&lt;br /&gt;   ex". In the situation when an exception is catch, some processing(logging)&lt;br /&gt;   is done and the same exception is thrown back, a "throw" should be used&lt;br /&gt;   instead of "throw ex". The later truncates the stack trace because it&lt;br /&gt;   creates a new exception and the former throws the same exception up the chain and&lt;br /&gt;   the stack trace has been preserved. In IL throw(ex) calls the "trow" instruction&lt;br /&gt;   and "throw" calls "retrow" instruction.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;     // database access can fail&lt;br /&gt;   }&lt;br /&gt;   catch (SqlException ex)&lt;br /&gt;   {&lt;br /&gt;     LogError(ex);&lt;br /&gt;     //throw ex; // DON’T DO THIS!&lt;br /&gt;     throw;&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;To wrap everything up:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;   &lt;li&gt;In helper method or in class libraries execution path throw "ArgumentException"&lt;br /&gt;       or "InvalidOperationException" or classes derived from them. Set "ParamName"&lt;br /&gt;       property of the "ArgumentException" to the invalid parameter name.&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;Choose a message that describes the exception precisely. Always assume the message&lt;br /&gt;       will be shown to the user.&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;If you need to "wrap" the exception in a more meaningful exception always&lt;br /&gt;       pass the original exception as inner exception. &lt;/li&gt;&lt;br /&gt;   &lt;li&gt;If you need to rethrow an exception up the chain and preserve the history in stack&lt;br /&gt;       trace, use "throw" instead of "throw ex".&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3350596475772680700-1369589409561124116?l=sevtopolis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sevtopolis.blogspot.com/feeds/1369589409561124116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sevtopolis.blogspot.com/2009/11/throw-right-exception-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/1369589409561124116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/1369589409561124116'/><link rel='alternate' type='text/html' href='http://sevtopolis.blogspot.com/2009/11/throw-right-exception-net.html' title='Throw the right Exception (.NET)'/><author><name>Sevtopolis Blog</name><uri>http://www.blogger.com/profile/17458351193464712607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_LmldToqO5fo/TQVRe9d9ElI/AAAAAAAAAAM/N0Us30flB3s/S220/154538_466902664555_704964555_5303979_4361809_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350596475772680700.post-2662759162378288495</id><published>2009-11-05T14:43:00.008-05:00</published><updated>2009-11-10T17:03:00.814-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery MAster Page ASP.NET'/><title type='text'>Add JQuery to ASP.NET Master Page</title><content type='html'>&lt;p&gt;&lt;br /&gt;    Recently we've been working on few ASP.NET project that require a decent amount&lt;br /&gt;    of rich user interaction so we decided to add JQuery to our &amp;quot;standard&amp;quot;&lt;br /&gt;    web forms project with master pages. The goal was to link JQuery to all pages in&lt;br /&gt;    out application by linking it to the application master page and crate and link&lt;br /&gt;    individual JavaScript files to the pages that needed JQuery functionalities. For&lt;br /&gt;    example we would have a &amp;quot;default.js&amp;quot; file that will be linked to &amp;quot;default.aspx&amp;quot;&lt;br /&gt;    page. That sounds great in theory but there were few problems. Since the master&lt;br /&gt;    page injects it's controls in the actual rendered page the relative path in the&lt;br /&gt;    master page is only valid if the master page resides in the same folder as the rendered&lt;br /&gt;    page. That will break all relative paths for all pages that are not in the same&lt;br /&gt;    folder in the project's folder tree. For example the following link will only work&lt;br /&gt;    if the master page and rendered page are in the same folder or in the same level&lt;br /&gt;    in relative to the linked files and will be a broken link to all pages that are&lt;br /&gt;    bellow or up in the hierarchy.&lt;pre class="brush: html"&gt; &lt;br /&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;&lt;br /&gt;    &amp;lt;/title&amp;gt;&lt;br /&gt;    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../Scripts/jquery-1.3.2.min.js&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;    We have spend some time and found two solution for this problem. The first one is&lt;br /&gt;    to add JQuery to the ScriptManager on the master page and then use ScriptManagerProxy&lt;br /&gt;    if another .js file that refers to a JQuery is added to the content page. An alternative&lt;br /&gt;    solution is to use ResolveUrl on the master page. The first solution is applicable&lt;br /&gt;    when a Script Manager is used in the web application /web site master page. If you&lt;br /&gt;    are planning to use ASP.NET AJAX Script Manager on your pages you can do the following:&lt;br /&gt;    Add Script Manager to the as a first component of form element in the master page&lt;br /&gt;    and put the ref to the JQuery using asp.net &amp;quot;~&amp;quot; as you would normally&lt;br /&gt;    do with any server control. Please note, that &amp;quot;&amp;lt;asp:scriptreference&amp;gt;&amp;quot;&lt;br /&gt;    is used to create a ref to an &amp;quot;.js&amp;quot; file.&lt;pre class="brush: html"&gt; &lt;br /&gt;&amp;lt;%@ Master&lt;br /&gt;Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;SiteScript.master.cs&amp;quot;&lt;br /&gt;Inherits=&amp;quot;WebApplicationTemplate.MasterPages.SiteScript&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;%@ Register&lt;br /&gt;Assembly=&amp;quot;System.Web.Extensions, Version=3.5.0.0, Culture=neutral,&lt;br /&gt;PublicKeyToken=31bf3856ad364e35&amp;quot;&lt;br /&gt;Namespace=&amp;quot;System.Web.UI&amp;quot; TagPrefix=&amp;quot;asp&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE html&lt;br /&gt;PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;link href=&amp;quot;../Styles/site.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;asp:ContentPlaceHolder ID=&amp;quot;head&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/asp:ContentPlaceHolder&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;asp:ScriptManager ID=&amp;quot;ScriptManager1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;Scripts&amp;gt;&lt;br /&gt;&amp;lt;asp:ScriptReference Path=&amp;quot;~/Scripts/jquery-1.3.2.min.js&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/Scripts&amp;gt;&lt;br /&gt;&amp;lt;/asp:ScriptManager&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;asp:ContentPlaceHolder ID=&amp;quot;ContentPlaceHolder1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/asp:ContentPlaceHolder&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;/pre&gt;&lt;br /&gt;    On the actual pages another javascript file that refers to the JQuery reference&lt;br /&gt;    can be linked to a page using ScriptManagerProxy.&lt;pre class="brush: html"&gt; &lt;br /&gt;&amp;lt;%@ Page Title=&amp;quot;&amp;quot; Language=&amp;quot;C#&amp;quot;&lt;br /&gt;MasterPageFile=&amp;quot;~/MasterPages/SiteScript.Master&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot;&lt;br /&gt;CodeBehind=&amp;quot;delme.aspx.cs&amp;quot; Inherits=&amp;quot;WebApplicationTemplate.delme&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;%@ Register&lt;br /&gt;Assembly=&amp;quot;System.Web.Extensions, Version=3.5.0.0, Culture=neutral,&lt;br /&gt;PublicKeyToken=31bf3856ad364e35&amp;quot;&lt;br /&gt;Namespace=&amp;quot;System.Web.UI&amp;quot; TagPrefix=&amp;quot;asp&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;asp:Content ID=&amp;quot;Content1&amp;quot;&lt;br /&gt;ContentPlaceHolderID=&amp;quot;head&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/asp:Content&amp;gt;&lt;br /&gt;&amp;lt;asp:Content ID=&amp;quot;Content2&amp;quot;&lt;br /&gt;ContentPlaceHolderID=&amp;quot;ContentPlaceHolder1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;asp:ScriptManagerProxy ID=&amp;quot;ScriptManagerProxy1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;Scripts&amp;gt;&lt;br /&gt;&amp;lt;asp:ScriptReference Path=&amp;quot;~/Scripts/Default.js&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/Scripts&amp;gt;&lt;br /&gt;&amp;lt;/asp:ScriptManagerProxy&amp;gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;mainDiv&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;img src=&amp;quot;Images/btn_web20.png&amp;quot; alt=&amp;quot;web 2.0 button&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/asp:Content&amp;gt; &lt;/pre&gt;&lt;br /&gt;    In this example Default.js has a reference to a JQuery and contains script that&lt;br /&gt;    works specifically with the default.aspx. page&lt;br /&gt;    &lt;pre class="brush: js"&gt; &lt;br /&gt;$(document).ready(function() {&lt;br /&gt;$('#mainDiv').hide();&lt;br /&gt;$('#mainDiv').fadeIn(3500);&lt;br /&gt;}&lt;br /&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;    The second approach for adding a JQuery to all pages is to resolve the path of the&lt;br /&gt;    linked JavaScript file using &amp;quot;ResolveUrl&amp;quot;.&lt;br /&gt;    &lt;pre class="brush: html"&gt; &lt;br /&gt;&amp;lt;%@ Master Language=&amp;quot;C#&amp;quot;&lt;br /&gt;AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;Site.master.cs&amp;quot;&lt;br /&gt;Inherits=&amp;quot;WebApplicationTemplate.MasterPages.Site&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD&lt;br /&gt;XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; &amp;gt;&lt;br /&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;script&lt;br /&gt;type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;&amp;lt;%=ResolveUrl(&amp;quot;~/Scripts/jquery-1.3.2.min.js&amp;quot;)%&amp;gt;&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;asp:ContentPlaceHolder ID=&amp;quot;m_Head&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/asp:ContentPlaceHolder&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;form id=&amp;quot;form1&amp;quot;&lt;br /&gt;runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;asp:ContentPlaceHolder ID=&amp;quot;m_Content&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/asp:ContentPlaceHolder&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;/pre&gt;&lt;br /&gt;    Then the actual page can put the link to it's own javascript file in the header&lt;br /&gt;    like this.&lt;br /&gt;    &lt;pre class="brush: html"&gt; &lt;br /&gt;&amp;lt;%@ Page Title=&amp;quot;&amp;quot; Language=&amp;quot;C#&amp;quot;&lt;br /&gt;MasterPageFile=&amp;quot;~/MasterPages/Site.Master&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot;&lt;br /&gt;CodeBehind=&amp;quot;Default.aspx.cs&amp;quot; Inherits=&amp;quot;WebApplicationTemplate.Default&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;%@ Register&lt;br /&gt;Assembly=&amp;quot;DiscoveryLogicWebControls&amp;quot;&lt;br /&gt;Namespace=&amp;quot;DiscoveryLogic.Web.UI.WebControls&amp;quot;&lt;br /&gt;TagPrefix=&amp;quot;dlc&amp;quot; %&amp;gt;&lt;br /&gt;&amp;lt;asp:Content ID=&amp;quot;Content1&amp;quot;&lt;br /&gt;ContentPlaceHolderID=&amp;quot;m_Head&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;script&lt;br /&gt;src=&amp;quot;Scripts/Default.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/asp:Content&amp;gt;&lt;br /&gt;&amp;lt;asp:Content ID=&amp;quot;Content2&amp;quot;&lt;br /&gt;ContentPlaceHolderID=&amp;quot;m_Content&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;mainDiv&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;img src=&amp;quot;Images/btn_web20.png&amp;quot; alt=&amp;quot;web 2.0 button&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/asp:Content&amp;gt; &lt;/pre&gt;&lt;br /&gt;    Note, that when the file is linked in the actual page itself the ResolveUrl is not&lt;br /&gt;    needed, since the relative path specified in the header content place holder is&lt;br /&gt;    not going to change. Each of the approaches add the JQuery to the all pages of the&lt;br /&gt;    web application/website project but the HTML generated is quite different. (The&lt;br /&gt;    Html can be seen by seen in each browser by right click on the page and clicking&lt;br /&gt;    &amp;quot;View Source&amp;quot;.) If &amp;quot;Script Manager&amp;quot; is already in use in the&lt;br /&gt;    application is probably better to add link to JQuery using ScriptManager/ScriptManagerProxy&lt;br /&gt;    feature, but if this is not the case use of ResolveUrl might produce a smaller HTML&lt;br /&gt;    since ScriptManager adds some markup overhead. The important point to call out is&lt;br /&gt;    that mixing and matching two approaches might result in non functional page, especially&lt;br /&gt;    if a JavaScript file is added in the content page's header but the JQuery is linked&lt;br /&gt;    via script manager on the master page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3350596475772680700-2662759162378288495?l=sevtopolis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sevtopolis.blogspot.com/feeds/2662759162378288495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sevtopolis.blogspot.com/2009/11/add-jquery-to-aspnet-master-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/2662759162378288495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350596475772680700/posts/default/2662759162378288495'/><link rel='alternate' type='text/html' href='http://sevtopolis.blogspot.com/2009/11/add-jquery-to-aspnet-master-page.html' title='Add JQuery to ASP.NET Master Page'/><author><name>Sevtopolis Blog</name><uri>http://www.blogger.com/profile/17458351193464712607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_LmldToqO5fo/TQVRe9d9ElI/AAAAAAAAAAM/N0Us30flB3s/S220/154538_466902664555_704964555_5303979_4361809_n.jpg'/></author><thr:total>0</thr:total></entry></feed>
