ASP.NET Tutorial – Master Pages & Site Navigation – Part2


Use Master Pages and Site Navigation? Create a web site with a consistent layout and design across all its pages using ASP.NET 2.0 MasterPages. See how easy it is to add navigation to a web site using the new TreeView and SiteMapPath controls. For Best View: watch the video in Full Screen Mode.

Java Server Pages

JSP Hosting is a Java hosting program that has many similarities to Microsoft ASP. JSP hosting refers to the ability to run and manage Java Server Pages. Even though Java Server Pages (JSP) is quite similar to Microsoft’s Active Server Pages (ASP) JSP does have slight differences in the hosting environment.

Java Server Pages is a server-side language that uses simple tag-based codes inserted into HTML and XML to produce dynamic and interactive web pages that are platform independent, meaning that by all rights they should appear exactly the same on every computer screen, regardless of the platform. This is the result when your publish yoy JSP-coded website on a JSP-supported Java hosting provider.

JSP allows web designers combine dynamically generated HTML in with their standard, static HTML code. While most CGI programs require you to compose the entire website in that one program, JSP allows you to compose the dynamic aspects and the static aspects of your site separately.

Java Hosting which includes JSP support would be the logical choice of any web designer wishing to eliminate the irritating need to repeat work they’ve already done. Java hosting, and JSP hosting specifically, would also be an efficient choice for those web designers working with a team.

One of the greatest aspects about JSP is that you don’t need to learn Java to use it and it’s practically built into programs like Macromedia Dreamweaver MX.
JSP’s use a variety of simple tags. The following are some of the most basic and common ones:

* Directives: <%@directive%> Instructions processed when the page is compiled

* Hidden Comments: <–comment–> Document the page, not sent to the client

* Declarations: <%!declaration%> Declare methods or variables with scope throughout the page.

* Expressions: <%=expression%> A bit more complicated to explain, expressions produce results which are then inserted into the output stream at the appropriate place

* Scriptlets: <%scriptlet%> A fragment of code that can access a declared variable and execute it at a defined time.

* Actions: <jsp:action> An XML-style tag that can perform any of a slew of functions

So if you are running JSP, remember that you need to have a host that provides JSP runtime modules on the host side of your web server so that you can run the appropriate scripts.

Read about grilling potatoes, how to cook bok choy and other information at the Knowledge Galaxy website.

Optimizing Your ASP.Net Pages for Faster Loading and Better Performance.

If you read the internet and all of the websites dedicated to Asp.Net you will inevitably read about the wonders of the DataGrid, DataList, and Repeater controls. While each of these has its place, if you are only displaying data there is a much faster and more efficient means to do so.

Let’s say you have a page that displays articles based on a query string. Take my article pages for instance. Each article is stored in a database and displayed on the page based on the unique id of the article as stored in the database.

A normal asp page execution procedure goes something like this. The code queries the database based on the Article I.D. and then brings back that information to the page where you display it in the fashion that you would like. This is a fairly straight forward approach with asp and is done all the time.

So how do we speed up our asp.net pages?

Number 1: Use Asp.Net Caching!

This is a no-brainer, and I won’t go into the brilliance or details of asp.net caching here because at the time of this writing Google has 2,780,000 articles on the topic. Basically instead of querying the database each time the page is loaded you only query the database once and load that result into the system cache. Subsequent calls to load the page retrieve the data from the cache as opposed to the database which gives you an instant and considerable performance boost. You can then set the cache for how long the cache should store the information as well as many other features. If you are not using the cache, you should be whenever possible!

Number 2: If possible, do NOT use the standard Asp.Net controls.

That’s right. The standard asp.net controls are designed for rapid development and not page performance. They allow you to design pages that grab and display data very quickly but their actual performance suffers because of the extra overhead which is there for ease and speed of development time and not page execution speed.

Continue reading “Optimizing Your ASP.Net Pages for Faster Loading and Better Performance.”