<?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-1550820647695050561</id><updated>2012-02-16T09:14:18.823-08:00</updated><title type='text'>Matt#</title><subtitle type='html'>HAI WORLD. 
HAI CAN HAS STDIO? 
VISIBLE "HAI WORLD!" 
KTHXBYE</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mattsharp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1550820647695050561/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mattsharp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Google Ninja</name><uri>http://www.blogger.com/profile/14183289412792782777</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://i3.photobucket.com/albums/y92/googleninja/nmh5-small.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1550820647695050561.post-7477988569764880393</id><published>2008-03-01T20:06:00.001-08:00</published><updated>2008-03-01T20:06:53.938-08:00</updated><title type='text'>Fire ASP.net client side validation programmatically</title><content type='html'>&lt;p&gt;This one is really nice. I had a scenario where I wanted to do client side validation, but server side processing was going to be done via a WebMethod call via a JQuery POST. I really like the ASP.net validators for basic validation, so I wanted to use them in this case. Turns out that ASP wires the validation call into the submit javascript somewhere. After a bit of perseverance and some experimentation, I ran across this method:&lt;/p&gt;  &lt;p&gt;Page_ClientValidate(validationGroupName)&lt;/p&gt;  &lt;p&gt;Turns out that little gem will fire the validators, and return the state of things, which is exactly what I wanted. Here is a basic javascript function that uses it.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;function &lt;/span&gt;doSave() {&lt;br /&gt;&lt;span style="color: blue"&gt;  if &lt;/span&gt;(Page_ClientValidate(&lt;span style="color: #a31515"&gt;&amp;quot;valgroup&amp;quot;&lt;/span&gt;)) {&lt;br /&gt;    alert(&lt;span style="color: #a31515"&gt;&amp;quot;valid&amp;quot;&lt;/span&gt;);&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1550820647695050561-7477988569764880393?l=mattsharp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsharp.blogspot.com/feeds/7477988569764880393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1550820647695050561&amp;postID=7477988569764880393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1550820647695050561/posts/default/7477988569764880393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1550820647695050561/posts/default/7477988569764880393'/><link rel='alternate' type='text/html' href='http://mattsharp.blogspot.com/2008/03/fire-aspnet-client-side-validation.html' title='Fire ASP.net client side validation programmatically'/><author><name>Google Ninja</name><uri>http://www.blogger.com/profile/14183289412792782777</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://i3.photobucket.com/albums/y92/googleninja/nmh5-small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1550820647695050561.post-5528748600520630097</id><published>2008-03-01T19:53:00.001-08:00</published><updated>2008-03-01T20:15:06.811-08:00</updated><title type='text'>CSS Selectors, Part I</title><content type='html'>&lt;p&gt;This is one of the big things that in my opinion, separates the CSS beginner from the intermediate. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;CSS Basics&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;CSS (Cascading Style Sheets) starts with the word &amp;quot;Cascading&amp;quot; for a reason. You have external stylesheet files that apply to multiple pages, internal inline stylesheets for page specific rules, and tag level style rules. Each level will override all outer levels (so a tag level style attribute will override rules set in the header, or in an external file). &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Selectors&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now, when defining a style rule for a tag, you give it the tag name, followed by brace brackets ({ }), in which you define what attributes you want. So, something like this: &lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #a31515"&gt;a &lt;/span&gt;{ &lt;span style="color: red"&gt;color&lt;/span&gt;: &lt;span style="color: blue"&gt;Red&lt;/span&gt;; &lt;span style="color: red"&gt;font-weight&lt;/span&gt;: &lt;span style="color: blue"&gt;bold&lt;/span&gt;; }&lt;/pre&gt;&lt;p&gt;tells the browser that for all &amp;lt;a&amp;gt; tags, make the colour red, and the font bold.&lt;/p&gt;&lt;p&gt;Now, what if you want most of your &amp;lt;a&amp;gt; tags to be red and bold, but there are five navigation links you want to be a nice maroon? Based on what we talked about earlier, the obvious choice is something like this:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;head&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;CSS Pwnz J00!!&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;style &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;text/css&amp;quot;&amp;gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #a31515"&gt;a &lt;/span&gt;{&lt;br /&gt;      &lt;span style="color: red"&gt;color&lt;/span&gt;: &lt;span style="color: blue"&gt;Red&lt;/span&gt;;&lt;br /&gt;      &lt;span style="color: red"&gt;font-weight&lt;/span&gt;: &lt;span style="color: blue"&gt;bold&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;span style="color: blue"&gt;&lt;font color="#333333"&gt;  &lt;/font&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;style&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;head&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;a &lt;/span&gt;&lt;span style="color: red"&gt;href&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;index.html&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;style&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;&lt;/span&gt;&lt;span style="color: red"&gt;color&lt;/span&gt;: &lt;span style="color: blue"&gt;Maroon&amp;quot;&amp;gt;&lt;/span&gt;Home&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;a&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;What the rules in the header tell the browser is that all &amp;lt;a&amp;gt; tags are to be red and bold, what the style attribute in the link tells the browser is that for this tag (and its children), make the colour maroon. These two directives are in conflict, so the one that is at the innermost level wins, the result being&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&lt;font face="Verdana" color="#333333"&gt;&lt;a href="http://lh5.google.com/hyuga.citan/R8okoF7S-6I/AAAAAAAAABk/nsAjZwM736I/home3"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="32" alt="home" src="http://lh6.google.com/hyuga.citan/R8okoV7S-7I/AAAAAAAAABs/nxrF0oaH_28/home_thumb1" width="53" border="0" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;... Which is a marooned, bolded link.&lt;/p&gt;&lt;p&gt;This is where most peoples knowledge seems to end. You can achieve the effect desired with these skills alone. There is alot more to the story though if one wants to write elegant code. One of the prime principals to keep in mind when writing elegant solutions is something called &amp;quot;Separation of Concern&amp;quot;. But that will have to wait for part II.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1550820647695050561-5528748600520630097?l=mattsharp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsharp.blogspot.com/feeds/5528748600520630097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1550820647695050561&amp;postID=5528748600520630097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1550820647695050561/posts/default/5528748600520630097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1550820647695050561/posts/default/5528748600520630097'/><link rel='alternate' type='text/html' href='http://mattsharp.blogspot.com/2008/03/css-selectors-part-i.html' title='CSS Selectors, Part I'/><author><name>Google Ninja</name><uri>http://www.blogger.com/profile/14183289412792782777</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://i3.photobucket.com/albums/y92/googleninja/nmh5-small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1550820647695050561.post-369820437975574584</id><published>2008-03-01T19:36:00.001-08:00</published><updated>2008-03-01T19:36:20.435-08:00</updated><title type='text'>Hello, World</title><content type='html'>&lt;p&gt;First blog posts are always cheesy and a bit of a pain, so I'll make this short and sweet. &lt;/p&gt;  &lt;p&gt;I'm a ASP.net guy, and this is going to be a developer blog. But I wasn't always on the ASP side of things, so expect regular posts on general Web technology. This is mostly a place to put cool things I know that are either hard to learn about, or things which too many people don't know who should.&lt;/p&gt;  &lt;p&gt;So anyway's, hopefully you will find this stuff interesting, as always, comments and suggestions are welcome.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1550820647695050561-369820437975574584?l=mattsharp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsharp.blogspot.com/feeds/369820437975574584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1550820647695050561&amp;postID=369820437975574584' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1550820647695050561/posts/default/369820437975574584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1550820647695050561/posts/default/369820437975574584'/><link rel='alternate' type='text/html' href='http://mattsharp.blogspot.com/2008/03/hello-world.html' title='Hello, World'/><author><name>Google Ninja</name><uri>http://www.blogger.com/profile/14183289412792782777</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://i3.photobucket.com/albums/y92/googleninja/nmh5-small.jpg'/></author><thr:total>0</thr:total></entry></feed>
