Trick to install the Aggiorno Add-in in Visual Studio Shell Integrated Mode

by David Alfaro 31. October 2008 05:09

What are we facing?

I have some products integrated in Visual Studio 2008 Shell (integrated mode) like Phalanger. I would love to have Aggiorno Add-in installed in VS 2008 Shell integrated mode, so I could use it along with the integrated products.

The Solution

Let's assume you have Visual Studio 2008 Shell Integrated mode already installed. Let's assume you have .msi file of Aggiorno which is the installer for the Aggiorno Add-in.

You’ll first have to run the following registry file, that you can download:

InstallOnVsIntegrated.reg (340.00 bytes)

Which contains the following code

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup]
"Dbghelp_path"="C:\\Program Files\\Microsoft Visual Studio 9.0"

After you run it (in Vista you do a right-click on the file and click "Merge") you now can install Aggiorno Add-in on Visual Studio Shell, just run the installer.

In that way you will be able to see Aggiorno along with Phalanger coexisting happily.

Some external resources

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

hacks | tips

Render your page differently for printing

by Arnulfo Rodriguez 17. October 2008 02:00

What are we facing?

I have a web page that needs a printer friendly version and I don’t want to change its markup.

The Solution

Fortunately the html link tag allows to associate a style sheet depending on what device the document will be displayed on. Among the list of possible values that the media attribute can handle we will be focusing on the print value which is going to help us link an printing specific style sheet to the web page. The following example illustrates how to use the media attribute.

<link rel="stylesheet" type="text/css" href="printerfriendly.css" media="print"/>

Now that you have added the the link tag, you’ll notice that whatever style included in printerfriendly.css style sheet file will not affect any tag in your page when you’re are viewing it in your web browser, but if you print it, or execute print preview (let’s not waste paper), you’ll see that the printer specific styles will do their job.

Some External References

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

hacks | tips

Creating a Zebra Striped Table with jQuery

by Will Vásquez 16. October 2008 09:26

What Are We Facing?

Commonly, web designers are faced with the task of presenting tabular data, a common practice to display lots of data is the use of different colors for alternate rows, this is used as an aid to improve the readability of the information presented.

The most common way to use different colors in alternating rows is to use different CSS classes for the odd and even rows so we can apply a different style to each one. There are several ways to generate the classes in the rows, they can be generated when the table is created, usually by a server side script (ASP, PHP, JSP), or the classes can be set on client side, using javascript.

The Solution

Because we are trying to create a generic sample, we are going to focus on the client side generation of the CSS classes, and one of the best ways to achieve this is using jQuery.

jQuery is a very popular javascript library that provides us with many really useful functions and utilities that allow really neat effects in the client side code.

Including jQuery

To use the jQuery functions in our HTML document, we have to download the latest jQuery library from the jQuery download page and include the library in the document with a script tag like the following in the head of the page.

<script src="jQuery-1.2.6.min.js" type ="text/javascript"></script>

This tag adds a link to the jQuery library (version 1.2.6), and allows you to use jQuery functions in all the scripts of your page.

Creating the markup and styles

To create the "striped" table, we need to create a table with an id to identify it and apply the style only to that table, in this example we'll name it "stripedTable"

<table id="stripedTable">

After the table is defined, we need to create the styles that will apply to the table rows, thus we create a style for the even rows and another for the odd rows. In this code sample we'll also create an style for the table header

    <style type="text/css"> 
       .oddRow {background-color:#eeeeee;} 
       .evenRow {background-color:#cccccc;} 
       th {background-color:#666666;} 
    </style>

Creating the jQuery code

Finally, we need to create the jQuery code that will add the CSS classes to the tr tags, this is achieved with this code:

    <script type="text/javascript"> 
       $(document).ready(function() { 
       $("#stripedTable tr:odd").addClass("oddRow"); 
       $("#stripedTable tr:even").addClass("evenRow"); 
    }); 
    </script>

The first line of this code inside the script, registers a new function to be executed when the page has finished loading, the next line selects the odd tr tags inside an element with the id stripedTable and adds them the class "oddRow", the last line does the same with the even lines, adding them the class "evenRow".

Given that the assigned class names are the classes that are defined in the CSS style block, the table will be rendered with that style, producing the following result:

Rendering sample of an zebra striped table

As we can see, the table gets the styles in a really neat way, and we have improved the readability of the presented information easily.

Some external references

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

accessibility | css | html | jquery | tips

Adding Round Corners to Web Page elements.

by Daniel Álvarez 15. October 2008 03:54

What are we facing?

I want to use border but not with square corners, instead I prefer to place rounded corners to my boxes.

The Solution

Actually it's impossible to create any kind of rounded shapes just with HTML and CSS code, that's why for this exercise we must need to use images to represent the corners of the boxes.

A new question is: What's the better way to introduce those images with our boxes? A very maintainable way to do this is by using the power of CSS.

We must create a normal text box with four corner images and with an image to repeatedly create the parallel lines of the box, as the following:

  • Insert the four images as background with CSS.

    Image with 4 backgrounds in the corners

    HTML code.

    <div class="c3"><div class ="c4"><div class="c1"><div class="c2">
       l'arte di apprendimento
    </div></div></div></div>

    CSS code.

    .c1 {background: url(c1.gif) 0 100% no-repeat}
    .c2 {background: url(c2.gif) 100% 100% no-repeat}
    .c3 {background: url(c3.gif) 0 0 no-repeat}
    .c4 {background: url(c4 .gif) 100% 0 no-repeat; padding:10px}
  • Add a border to the box (with more images).

    Image with 4 backgrounds in the corners and borders in the sides

    HTML code.

    <div class="l1"><div class="l2"><div class="l3"><div class="l4"><div class="c3"><div class ="c4"><div class="c1"><div class="c2">
       l'arte di apprendimento
    </div></div></div></div></div></div></div></div>

    CSS code.

    .l1 {background: url(dot.gif) repeat-x 0px 0px}
    .l2 {background: url(dot.gif) repeat-x 0px 100%}
    .l3 {background: url(dot.gif) repeat-y 0px 0px}
    .l4 {background: url(dot.gif) repeat-y 100% 0px}

Some external references

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

css | html | tips

Presenting source code listings

by Luis Fallas 10. October 2008 06:30

What are we facing?

I want to publish source code listings in my website. These listings should be easy to read, visually attractive and I don’t want to spend a lot of time formatting them.

The Solution

Using a syntax highlighting library can save you lots of time while also delivering very nicely formatted results.

There are several options to choose from, ranging from server-side options like Actipro’s CodeHighlighter(ASP.NET) or Javascript based options like Google’s SyntaxHighlighter.

Formatting code using these libraries is very easy, for example, to present a snipped of C# code you only have to type the following:

1. Reference the library


<link rel="stylesheet" type="text/css" href="css/SyntaxHighlighter.css"/>
<script language="javascript" src="js/shCore.js"></script>
<script language="javascript" src="js/shBrushCSharp.js"></script>
<script language="javascript" src="js/shBrushXml.js"></script>

2. Annotate the element that contains the source code listing with the programming language name:


<pre name="code" class="c-sharp">
   public static int fact(int v) 
   {
      if(v == 0) 
      {
         return 1;
      }
      else
      {
         return fact(v-1)*v;
      }
   }
</pre>

3. Invoke the Syntax Highlighting script:


<script language="javascript">
dp.SyntaxHighlighter.ClipboardSwf = '/flash/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
</script>

The final output looks like this:

Formatted source code

Some external references

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

tips

About Aggiorno KC

Aggiorno RSS Feeds As Web developers, we are always hunting for pieces of wisdom spread all over the Web, by friends, by books, or both. Normally it requires time and effort to search and locate that wisdom and then even more to implement it. Knowledge Capsules provide you with a consolidated place to find all the specific pieces of code and advice you are commonly looking for, all provided by fellow Web developers.

IE8 Compatibility Wizard

Automatically upgrades your website to render correctly in IE8!

Internet Explorer 8 Compatibility Wizard

Get it today!


ArtinSoft Corporation ArtinSoft is Microsoft Certified Partner ISV/Software Solutions and Microsft Visual Studio Partner

With over fifteen years of experience, ArtinSoft has proven to be a key player in software evolution, by allowing customers from all over the world to ensure business continuity and compliance through software migration solutions and developer tools created upon principles of artificial intelligence. At present time, ArtinSoft Corporation remains a private firm in constant growth through a strategic partner network. Read More...