Browser Compatibility Master Table from QuirksMode

Thursday, 30 April 2009 11:10 by myro
Building a cross-browser website is a pain in the ass, but there's someone on the the net who can help you with this job: http://www.quirksmode.org/
I fouded Peter-Paul Koch's site because I had problems developing a cross-browser javascript code and I found it really interesting and easy to understand. After a quite deep reading I can confirm what Peter-Paul says: QuirksMode.org is the prime source for browser compatibility information on the Internet.
His best project can be found in the Compatibility Master Table where you can check before your development, if your ideas will work fine on almost every browser. Probably he is right when he says: "His DOM Compatibility Tables are reliably estimated to have saved the global web developer population about € 5 million on hair transplants in 2007 alone."
I wish i founded this site earlier...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Web
Actions:   Bookmark and Share | Permalink | Comments (0) | Comment RSSRSS comment feed

Add CSS StyleSheet Link in ASP.NET page header at runtime

Friday, 24 April 2009 10:55 by myro

Is not really intuitive how can you add a reference to a css stylesheet at runtime in ASP.NET in the HTML head section: you need to call the page's ClientScript manager and register a Javascript script block defining your script code as a link tag. Remember that RegisterCssReference method will only work if you call it before the page's OnRender event method, so use it in OnLoad and OnPreRender page's events.

protected void RegisterCssReference(string CssLinkurl)
{
       if (!String.IsNullOrEmpty(CssLinkurl))
       {
           String sb = String.Empty;
           sb = String.Concat("<link rel=\"stylesheet\" href=\"", CssLinkurl,
                 "\" type=\"text/css\" media=\"screen\" />");
           Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "YOUR_KEY", sb , false);
       }
}

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   .NET | Web
Actions:   Bookmark and Share | Permalink | Comments (0) | Comment RSSRSS comment feed

Sharepoint WebPart Lifecycle Events

Thursday, 23 April 2009 11:06 by myro

The original post can be found at platinumdogs.wordpress.com. 
Visit this arcticle at CodeProject if you need a deeper introduction to SharePoint Web Part's lifecycle events.

This post describes the lifecycle events of a Sharepoint Connectable WebPart wih a single ViewState backed property;

On Page Load

  • Constructor
  • OnInit
  • OnLoad
  • ConnectionConsumer method is called if web part is connectable (sets the connection providers interface in the webpart)
  • CreateChildControls
  • OnPreRender (if your web part is connectable you would typically call the connection provider here to retrieve data)
  • SaveViewState
  • Render
  • RenderChildren
  • RenderContents

On 1st Postback

  • (PostBack click handler sets ViewState via public Property)
  • Constructor
  • OnInit
  • CreateChildControls
  • OnLoad
  • PostBack click handling
  • ConnectionConsumer method is called if web part is connectable (sets the connection providers interface in the webpart)
  • OnPreRender (if your web part is connectable you would typically call the connection provider here to retrieve data)
  • SaveViewState
  • Render
  • RenderChildren
  • RenderContents

On 2nd Postback

(PostBack click handler sets ViewState via public Property)

  • Constructor
  • OnInit
  • LoadViewState
  • CreateChildControls
  • OnLoad
  • PostBack click handling
  • ConnectionConsumer method is called if web part is connectable (sets the connection providers interface in the webpart)
  • OnPreRender (if your web part is connectable you would typically call the connection provider here to retrieve data)
  • SaveViewState
  • Render
  • RenderChildren
  • RenderContents


Note that during the 2nd postback, LoadViewState, is called, since in the 1st postback the click handler sets the value of the ViewState backed public property. 
Credits for this post goes to Phil Harding. Thanks Phil for sharing. 

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   SharePoint 2007
Actions:   Bookmark and Share | Permalink | Comments (1) | Comment RSSRSS comment feed

Collapse or Expand SharePoint web parts in your pages: get OpenCloseWps

Wednesday, 22 April 2009 14:42 by myro

Based on this post founded in Path to SharePoint, I have created a SharePoint Web Part called SharePointOpenCloseWps that once installed in your SharePoint page, it let’s you choose which Web Parts you want to make collapsible. The OpenCloseWps allows you to choose what web part should be collapsible by configuring OpenCloseWps’s property named “Web Part names to make collapsible”. In this post you will find the source code and the intaller.
The solution is built using Visual Studio 2008 and WspBuilder (if you don’t know what is WspBuilder, get it and try it!) and can be easily installed running a batch file.

Installation

Download the sourcecode and navigate to “\SharePointOpenCloseWps\bin\deploy\SharePointOpenCloseWps”, run deploywithstsadmOnLocalhost if you want to install it on http://localhost/ or edit the file and add your SharePoint site’s url. Once the batch has completed, go to your “web parts gallery” under your site collection’s “Site Settings” , clicck new and add OpenCloseWps.webpart:

wpinstall

Next, go to your SharePoint page, add the web part, and edit the property named “Web Part names to make collapsible” under Settings. Insert the titles of the Web Parts that you need to make collapsible and press Apply:

wpprops

The OpenCloseWps will load the necessary JavaScript code to perform the trick and your Web Parts will be fully expandable / collapsible:

wpworks 

 

Please note that only one OpenCloseWps is allowed in the same page. If you have questions let me know..

Download OpenCloseWps SharePointOpenCloseWps20090422214413.rar (503.89 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   SharePoint 2007
Actions:   Bookmark and Share | Permalink | Comments (1) | Comment RSSRSS comment feed

Online free chart application from autodesk

Friday, 17 April 2009 17:22 by myro

Why should you pay for a chart program if you can geti it for free?
Autodesk published an impressive web application completely free to let you draw you own charts online.  Project Draw allows you to do everthing you need:

http://draw.labs.autodesk.com/ADDraw/draw.html

You don't need to have a product serial number to use all the features: just create an account and skip the last step where you are asked to provide the key:

 https://registeronce.autodesk.com/eidm/selfcare/beginSelfRegistration!input.action

Don't forget to register and press ctrl + d once you have visited the link Laughing

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Web
Actions:   Bookmark and Share | Permalink | Comments (0) | Comment RSSRSS comment feed