Approaches to Web Development for Bioinformatics

Previous  Contents  Next
References

Developing Web Applications with ASP.NET

In this section:

Introduction

ASP.NET is framework from Microsoft to develop and manage web applications. ASP stands for Active Server Pages, an older version of the framework based on Active X technology. The HTML pages are made dynamic by scripting on the server with either Visual Basic or C#. I will only discuss C# but Visual Basic is similar. The section C# discusses the basics of C# as an application programming language. The section Bioinformatics Tools using ASP.NET discusses application of the principles described here to bioinformatics.

The server pages need to be run on Microsoft Internet Information Server or within Visual Studio. Just as in PHP or Java Server Pages the script within the scripting tags is interpreted and executed on the server being replaced by HTML sent to the browser. The ASP.NET web site43 gives a fuller description and a getting start tutorial.

Getting Started with ASP.NET

To see what I am talking about, here is the basic hello world program in ASP.NET. Save the page as Default.aspx and run it on IIS or within Visual Studio.


<%@ Page Language=span class="java_literal">"C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head/>
<body>
<%string message = "Hello .NET";%>
<%=message%>
</body>
</html>

The result is a HTML page with the text "Hello .NET". The first line of the page specifies that the language is C#. The other possible value is "VB". As in old versions of ASP, the code within the <% %> tags is evaluated. The code within the <%= %> is evaluated and output to the HTML page. Click on the Continue or Run button in Visual Studio. It will start the internal server and bring up a web page like this:


Previous  Contents  Next
References

Contributed Comments and NotesAdd a comment.

There are no user comments.

Google

Please send ideas and opinions by email at alexamies@gmail.com.

© 2006-2007 Alex Amies