On The Rocks

April 30, 2007

Websiteicons

Filed under: Uncategorized

 

Cool images to your web site.

 

Link to Websiteicons

April 29, 2007

60 best CSS directories you would die to watch! at Witty Sparks

Filed under: Uncategorized

 

With new technologies flooding the web,different tools are available with which a web designer can showcase his creativity and craft. But despite putting in the effort and sweat, numerous websites with fantastic creativity fail to get noticed. Also, the surge in designing is driving designers to dig for creativity, color schemes and layouts.

Keeping these aspects in mind, we came up with a compendium of best CSS directories, CSS showcase, CSS galleries that rank / grade websites (using CSS) on the basis of ‘alexa ranking’, colors, categories, tags, ratings and RSS.

If you feel that a particular site is worth to get showcased, then drop the URL’s in your comments so that they become a part of our next list.

If you found this article useful, digg it to ensure that a designer’s effort doesn’t go unnoticed.

 

Sites

www.cssbeauty.com

www.cssdrive.com

www.stylegala.com

www.cssmania.com

www.cssremix.com

www.alvit.de/css-showcase/

www.cssvault.com

www.w3csites.com

www.bestwebgallery.com

www.csselite.com

www.screenalicious.com

www.unmatchedstyle.com

www.designlinkdatabase.net

www.screenfluent.com

www.designsnack.com

www.cssheaven.com

www.cssimport.com

www.cssglobe.com

www.cssreboot.com

www.mostinspired.com

www.thebestdesigns.com

http://thesis.veracon.net

www.cssbloom.com

www.csscollection.com

www.csstux.com

www.cssbased.com

www.css-website.com

www.designshack.co.uk

www.ceeses.com

http://anjo.dekiteharu.jp

www.cssclip.com

www.my3w.org

www.csshazard.com

www.artnetz.de

www.css-design-yorkshire.com

www.css11.com

www.cssimpress.com

www.e-motionaldesign.com

www.cssprincess.com

www.cssgaleri.com

www.cssblast.ru

www.creative-pakistan.com

www.netzfruehling.de

www.najdizajn.com

www.edustyle.net

www.csssmoothoperator.com

www.coolsitecollection.com

www.cssgalaxy.com

www.per.fectio.net

www.cssflavor.com

www.onepixelarmy.com

www.piepmatzel.de

www.cssbrain.hu

www.w3c-compliance.com

www.stylegrind.com

www.submitcss.com

http://inspirace.dobrestranky.com

www.cssgallery.ro

www.cssgreen.com

 

Link to 60 best CSS directories you would die to watch! at Witty Sparks

April 25, 2007

iconfinder - Search more than 5000 icons

Filed under: Uncategorized

 

Link to iconfinder - Search more than 5000 icons

April 22, 2007

ASP.NET 2.0 Tricks

Filed under: Uncategorized

1. Maintain the position of the scrollbar on postbacks:  In ASP.NET 1.1 it was a pain to maintain the position of the scrollbar when doing a postback operation.  This was especially true when you had a grid on the page and went to edit a specific row.  Instead of staying on the desired row, the page would reload and you’d be placed back at the top and have to scroll down.  In ASP.NET 2.0 you can simply add the MaintainScrollPostionOnPostBack attribute to the Page directive:

   1:  
   2: <%@ Page Language=“C#” MaintainScrollPositionOnPostback=“true” 
   3:   AutoEventWireup=“true” CodeFile=“…” Inherits=“…” %> 
   4:  

 

2.  Set the default focus to a control when the page loads:  This is another extremely simple thing that can be done without resorting to writing JavaScript.  If you only have a single textbox (or two) on a page why should the user have to click in the textbox to start typing?  Shouldn’t the cursor already be blinking in the textbox so they can type away?  Using the DefaultFocus property of the HtmlForm control you can easily do this.

   1: <form id=”frm” DefaultFocus=”txtUserName” runat=”server”>
   2:
   3: </form> 

 

3. Set the default button that is triggered when the user hits the enter key:  This was a major pain point in ASP.NET 1.1 and required some JavaScript to be written to ensure that when the user hit the enter key that the appropriate button on the form triggered a “click” event on the server-side.  Fortunately, you can now use the HtmlForm control’s DefaultButton property to set which button should be clicked when the user hits enter.  This property is also available on the Panel control in cases where different buttons should be triggered as a user moves into different Panels on a page.

   1: <form id=”frm” DefaultButton=”btnSubmit” runat=”server”>
   2:
   3: </form> 

 

4. Locate nested controls easily: Finding controls within a Page’s control hierarchy can be painful but if you know how the controls are nested you can use the lesser known “$” shortcut to find controls without having to write recursive code.  If you’re looking for a great way to recursively find a control (in cases where you don’t know the exact control nesting) check out my good buddy Michael Palermo’s blog entry. The following example shows how to use the DefaultFocus property to set the focus on a textbox that is nested inside of a FormView control.  Notice that the “$” is used to delimit the nesting:

   1: <form id=”form1″ runat=”server” DefaultFocus=”formVw$txtName”>
   2: <div>
   3: <asp:FormView ID=”formVw” runat=”server”>
   4: <ItemTemplate>
   5: Name: 
   6: <asp:TextBox ID=”txtName” runat=”server” 
   7: Text=’<%# Eval(”FirstName”) + ” ” + Eval(”LastName”) %>’ />
   8: </ItemTemplate>
   9: </asp:FormView>
  10: </div>
  11: </form> 

 

This little trick can also be used on the server-side when calling FindControl().  I blogged about this awhile back if you’d like more details.  Here’s an example:

   1: TextBox tb = this.FindControl(“form1$formVw$txtName”) as TextBox;
   2: if (tb != null)
   3: {
   4: //Access TextBox control
   5: } 

5. Strongly-typed access to cross-page postback controls:  This one is a little more involved than the others, but quite useful.  ASP.NET 2.0 introduced the concept of cross-page postbacks where one page could postback information to a page other than itself.  This is done by setting the PostBackUrl property of a button to the name of the page that the button should postback data to.  Normally, the posted data can be accessed by doing something like PreviousPage.FindControl(”ControlID”).  However, this requires a cast if you need to access properties of the target control in the previous page (which you normally need to do).  If you add a public property into the code-behind page that initiates the postback operation, you can access the property in a strongly-typed manner by adding the PreviousPageType directive into the target page of the postback.  That may sound a little confusing if you haven’t done it so let me explain a little more.

If you have a page called Default.aspx that exposes a public property that returns a Textbox that is defined in the page, the page that data is posted to (lets call it SearchResults.aspx) can access that property in a strongly-typed manner (no FindControl() call is necessary) by adding the PreviousPageType directive into the top of the page:

   1: <%@ PreviousPageType VirtualPath=”Default.aspx” %> 

By adding this directive, the code in SearchResults.aspx can access the TextBox defined in Default.aspx in a strongly-typed manner.  The following example assumes the property defined in Default.aspx is named SearchTextBox.

   1: TextBox tb = PreviousPage.SearchTextBox; 

This code obviously only works if the previous page is Default.aspx.  PreviousPageType also has a TypeName property as well where you could define a base type that one or more pages derive from to make this technique work with multiple pages.  You can learn more about PreviousPageType here.

6. Strongly-typed access to Master Pages controls: The PreviousPageType directive isn’t the only one that provides strongly-typed access to controls.  If you have public properties defined in a Master Page that you’d like to access in a strongly-typed manner you can add the MasterType directive into a page as shown next (note that the MasterType directive also allows a TypeName to be defined as with the PreviousPageType directive):

 

   1: <%@ MasterType VirtualPath=”MasterPage.master” %> 

You can then access properties in the target master page from a content page by writing code like the following:

   1:  
   2: this.Master.HeaderText = “Label updated using MasterType directive with VirtualPath attribute.”; 
   3:  
   4:  

You can find several other tips and tricks related to working with master pages including sharing master pages across IIS virtual directories at a previous blog post I wrote

7. Validation groups: You may have a page that has multiple controls and multiple buttons.  When one of the buttons is clicked you want specific validator controls to be evaluated rather than all of the validators defined on the page.  With ASP.NET 1.1 there wasn’t a great way to handle this without resorting to some hack code.  ASP.NET 2.0 adds a ValidationGroup property to all validator controls and buttons (Button, LinkButton, etc.) that easily solves the problem.  If you have a TextBox at the top of a page that has a RequiredFieldValidator next to it and a Button control, you can fire that one validator when the button is clicked by setting the ValidationGroup property on the button and on the RequiredFieldValidator to the same value.  Any other validators not in the defined ValidationGroup will be ignored when the button is clicked. Here’s an example:

   1: <form id=”form1″ runat=”server”>
   2:     Search Text: <asp:TextBox ID=”txtSearch” runat=”server” /> 
   3:     <asp:RequiredFieldValidator ID=”valSearch” runat=”Server”
   4:       ControlToValidate=”txtSearch” ValidationGroup=”SearchGroup” /> 
   5:     <asp:Button ID=”btnSearch” runat=”server” Text=”Search”
   6: ValidationGroup=”SearchGroup” />
   7:     ….
   8:     Other controls with validators and buttons defined here
   9: </form>

April 16, 2007

Silverlight a.k.a WPF/E was revealed

Filed under: Uncategorized

Microsoft Unveils Silverlight to Power the Next Generation of Media Experiences on the Web

Leading media companies and solution providers announce support for new solution for video and interactivity on Mac- and Windows-based Web browsers.

LAS VEGAS — April 15, 2007 Today at the 2007 National Association of Broadcasters conference (NAB2007), Microsoft Corp. unveiled Microsoft® Silverlight™, a new cross-browser, cross-platform plug-in for delivering the next generation of media experiences and rich interactive applications (RIAs) for the Web. Early supporters of the new platform include Akamai Technologies Inc., Brightcove Inc., Eyeblaster Inc., Limelight Networks, Major League Baseball and Netflix Inc.

Microsoft Silverlight, previously called Windows® Presentation Foundation Everywhere (WPF/E), integrates with existing Web technologies and assets to provide higher-quality experiences with lower costs for media delivery. Delivered to end users through a seamless, fast installation, Silverlight offers consistent experiences to both Macintosh and Windows users on a variety of browsers including Internet Explorer®, Firefox and Safari.

“Content providers are seeking a way to deliver rich interactive applications using the tools and skills they already have. They want an end-to-end solution that enables them to rapidly reach multiple platforms with reasonable deployment costs,” said Bob Muglia, senior vice president of the Server and Tools Business at Microsoft. “Microsoft Silverlight delivers on this need and marks a real step forward for the industry. Silverlight is the only solution in the market today that enables content creators to tap into the broad ecosystem for Windows Media® technologies while taking the Web’s rich interactive application experience to new levels.”

Leading media companies and solution providers have announced support for Silverlight including Akamai Technologies, Brightcove, Eyeblaster, Limelight Networks, Major League Baseball, NaviSite Inc., Netflix, Pinnacle Systems Inc., Rhozet Corp., Skinkers, Sonic Solutions, Tarari Inc., Telestream Inc. and Winnov. All have indicated plans to deliver Silverlight-based experiences for their viewers and customers.

“We’ve consistently heard from the media companies that they want the ability to easily implement key technologies for Internet video and rich broadband experiences,” said Bob Mason, chief technology officer at Brightcove. “With the release of Silverlight, Microsoft is bringing rich interactive experiences coupled with the VC-1 video standard into the browser, and we’re excited to announce plans to support this technology and continue to give our customers access to the cutting-edge technologies that will drive the growth of Internet TV.”

 more in “http://www.microsoft.com/presspass/press/2007/apr07/04-15WPFEPR.mspx

April 12, 2007

Online Color Helpers

Filed under: Uncategorized

ColorBlender
You can slide the RGB buttons to create a core color which then automatically creates a coordinating palette.


DeGraeve

Input the URL of an image and the site will generate a lovely palette to match.

Kuler
Kuler from Adobe Labs helps you create endless colors and you always come out looking like a pro.


EasyRGB

Match your RGB values to real color paint lines (including Sherwin Williams), inks, fandecks, etc.

April 11, 2007

53 CSS Thechniques

Filed under: Uncategorized

Over the last few years web-developers have written many articles about CSS and developed many useful techniques, which can save you a lot of time - of course, if you are able to find them in time. Below you’ll find a list of techniques we , as web-architects, really couldn’t live without. They are essential and they indeed make our life easier. Let’s take a look at 53 CSS-based techniques you should always have ready to hand if you develop web-sites.

Thanks to all developers who contributed to accessible and usable css-based design over the last few years. We really appreciate it. Thanks!

1. CSS Based Navigation

CSS-Technique

2. Navigation Matrix Reloaded

CSS-Technique

3. CSS Tabs

CSS-Technique

4. CSS Bar Graphs (CSS For Bar Graphs)

CSS-Technique

5. Collapsing Tables: An Example

CSS-Technique

6. Adam’s Radio & Checkbox Customisation Method

CSS-Technique

7. CSS Image Replacement

CSS-Technique

8. CSS Shadows (CSS Shadows Roundup)

CSS-Technique

9. CSS Rounded Corners Roundup (Nifty Corners)

CSS-Technique

10. Drop Cap - Capital Letters with CSS

CSS-Technique

11. Define Image Opacity with CSS

CSS-Technique

12. How to Create a Block Hover Effect for a List of Links

CSS-Technique

13. Pullquotes with CSS (Automatic Pullquotes with JavaScript and CSS

CSS-Technique

14. CSS Diagrams

CSS-Technique

15. CSS Curves

CSS-Technique

16. Footer Stick allows for the footer of a Web page to appear either at the bottom of the browser window or the bottom of the Web page content – whichever is visually lowest.

CSS-Technique

17. CSS Image Map

CSS-Technique

18. CSS Image Pop-Up

CSS-Technique

19. CSS Image Preloader

CSS-Technique

20. CSS Image Replacement for Buttons

CSS-Technique

21. Link Thumbnail

CSS-Technique

22. CSS Map Pop

CSS-Technique

23. PHP-based CSS Style Switcher

CSS-Technique

24. CSS Unordered List Calender (CSS Styled Calender)

CSS-Technique

25. CSS-Based Forms: Techniques

CSS-Technique

26. CSS-Based Tables: Techniques

CSS-Technique

27. Printing Web-Documents and CSS

CSS-Technique

28. Improved Links-Display for Print-Layouts with CSS

CSS-Technique

29. CSS-Submit Buttons

CSS-Technique

30. CSS Teaser Box

CSS-Technique

31. CSS Tricks for Custom Bullets

CSS-Technique

32. Ticked Off Links Reloaded

CSS-Technique

33. CSS Zooming

CSS-Technique

34. Creating a Star Rater using CSS

CSS-Technique

35. The ways to style visited Links

CSS-Technique

36. PDF, ZIP, DOC Links Labeling

CSS-Technique

37. Displaying Percentages with CSS

CSS-Technique

38. Image Floats without the Text Wrap

CSS-Technique

39. Let visitors decide, whether or not will they open link in a new window

CSS-Technique

40. Simple accessible external links

CSS-Technique

41. Zebra Table with JavaScript and CSS

CSS-Technique

42. Vertical Centering with CSS (Horizontal and Vertical Centering with CSS

CSS-Technique

43. Unobtrusive Sidenotes

CSS-Technique

44. Image Caption with CSS (Styled Images with Caption)

CSS-Technique

45. Dynamic Piechart with CSS

CSS-Technique

46. Format Footnotes with CSS

CSS-Technique

47. Hierarchical Sitemap with CSS

CSS-Technique

48. Snook’s Resizable Underlines

CSS-Technique

49. Switchy McLayout: An Adaptive Layout Technique

CSS-Technique

50. StyleMap: CSS+HTML Visual Sitemap

CSS-Technique

51. Custom Reading Width

CSS-Technique

52. CSS Alert Message

CSS-Technique

53. CSS Production Notes

CSS-Technique

April 5, 2007

Mastering Google …

Filed under: Uncategorized

 

This site is a Quickstart for using google, you’ll discover helpful insights into how Google works and how to use it more effectively.

How ASP.NET AJAX 1.0 avoids JSON Attacks

Filed under: Uncategorized

Recently some reports have been issued by security researchers describing ways hackers can use the JSON wire format used by most popular AJAX frameworks to try and exploit cross domain scripts within browsers.  Specifically, these attacks use HTTP GET requests invoked via an HTML <script src=”"> include element to circumvent the “same origin policy” enforced by browsers (which limits JavaScript objects like XmlHttpRequest to only calling URLs on the same domain that the page was loaded from), and then look for ways to exploit the JSON payload content.

ASP.NET AJAX 1.0 includes a number of default settings and built-in features that prevent it from being susceptible to these types of JSON hijacking attacks.  Below are some details of how these attacks are mitigated:

ASP.NET AJAX Web Methods do not enable HTTP GET requests by default

Script files loaded via an HTML <script src=”"> element within a browser can only be retrieved via HTTP GET verb requests.

By default ASP.NET AJAX’s web services layer does not allow web methods to be invoked via the HTTP GET verb. For example, assume a developer writes a web service method like below:

[WebMethod]

public StockQuote[] GetQuotes(string symbol) {
}

ASP.NET will only allow the above GetQuotes method to be called via the HTTP POST verb, and will reject all attempts to invoke the method via an HTTP GET verb.

To make an ASP.NET AJAX web-method callable via HTTP GET-access, a developer must explicitly attribute each method using ASP.NET’s ScriptMethod attribute (and set the UseHttpGet property to true):

[WebMethod] 

[ScriptMethod(UseHttpGet=true)] 
public StockQuote[] GetQuotes(string symbol) { 

Although this type of modification is easy to make, it requires a developer to intentionally GET enable a web service. ASP.NET AJAX web services can never be non-deliberately GET enabled, and the ASP.NET AJAX documentation explicitly recommends against GET enabling web-service end points for a number of reasons (risk of url tampering being one of them).

Note: the ASP.NET AJAX “UpdatePanel” control, as well as the other server controls that ship with ASP.NET AJAX 1.0, do not use HTTP GET and instead use HTTP POSTs when doing asynchronous postbacks.

ASP.NET AJAX Content-Type Header Validation

There is a built-in validation layer of protection that ASP.NET enforces for both GET and POST based ASP.NET AJAX web methods, which is that regardless of the HTTP verb being used, ASP.NET always requires that the HTTP Content-Type header is set to the value application/json. It this content type header is not sent, ASP.NET AJAX will reject the request on the server.

Using the stock quote method shown earlier, an HTTP trace of an ASP.NET AJAX GET invocation must look like the following:

GET /StockService/Stock.asmx/GetQuotes?symbol=%22msft%22 HTTP/1.1 

Accept: */* 
Accept-Language: en-us,fr;q=0.5 
Referer: http://xxxxxx/StockService/test.aspx 
Content-Type: application/json; charset=utf-8 
UA-CPU: x86 
Accept-Encoding: gzip, deflate 
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2) 
Host: xxxxxx 
Proxy-Connection: Keep-Alive 

Note that even though the above is a GET request, the client-side ASP.NET AJAX JSON stack still inserts a Content-Type HTTP header that tells the server to consider this an AJAX web service request. The server-side web services stack for ASP.NET AJAX 1.0 always checks for this specific content type, and if it is not found it will reject the request.

If a malicious developer attempted a cross site request forgery attack using HTTP GETs against this web service, they might include a script tag in their page like the following:

<script type=”text/javascript” src=”http://contoso.com/StockService/Stock.asmx/GetQuotes?symbol=msft” /> 

However, browsers will not set the Content-Type to application/json when parsing a <script src=”"> element and making the request. As a result when ASP.NET receives a request made from a <script /> include, it will not recognize it as a request to an ASP.NET AJAX web service, and it will result in an error from ASP.NET stating that it does not recognize the requested URL.  This will prevent JSON Hijacking attempts (even if you have the GET verb enabled for a web method).

Summary

ASP.NET AJAX 1.0 by default only allows the HTTP POST verb to be used when invoking web methods using JSON, which means you can’t inadvertently allow browsers to invoke methods via HTTP GET.

ASP.NET AJAX 1.0 requires a Content-Type header to be set to “application/json” for both GET and POST invocations to AJAX web services.  JSON requests that do not contain this header will be rejected by an ASP.NET server.  This means you cannot invoke an ASP.NET AJAX web method via a <script src=”"> include because browsers do not allow append custom content-type headers when requesting a JavaScript file like this.

Published Wednesday, April 04, 2007 11:39 AM by ScottGu

Functional Javascript

Filed under: Uncategorized

Lisp? Scheme? Erlang, Haskell? Forget about them! The most widely deployed functional programming language is Javascript. Borrowing a trick or two from the transformers, Javascript masquerades as a procedural language until you’re ready to take it to the next level.

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com