Web Enable your C# Program

Page 1 of 2
  1. Introduction
  2. The Example

Introduction

How do we web enable our C# application? First we need a web server. You can either use IIS (built-in to Windows 2000/NT/XP Professional), or Apache. Apache is the most popular and practical and easily configurable web server available on the internet. It can be downloaded from http://www.apache.org. Apache runs on most of the operating systems. After installation on the network drive or local drive, we see a number of subdirectories among which we see cgi-bin and htdocs. The cgi-bin subdirectory is used to contain executable files, while htdocs is used to contain HTML files. When your installation and setup configuration is successful (for help see the website), type the address as http://127.0.0.1/ and press enter . We see a default page, placed in the htdocs directory, and see the apache server running !

Change the htdocs subdirectory and create an html file new.html, to display a form page as follows

<html>
<form>
<input type=submit value=search>
</form>
</html>


Now save this file! Open up your favourite browser and type http://127.0.0.1/new.html, and press enter. We see results! A button with a text(caption) search, is on the page ...... !!!

You might also like...

Comments

About the author

Kamran Shakil Pakistan

I am 22 male. BS(Computer Science), MCSE, Brainbench certifed. Member of .NET Open source, Mono Project. E-author on various websites, including www.dotnetextreme.com, www.csharphelp.com and so...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debugging is anticipated with distaste, performed with reluctance, and bragged about forever.” - Dan Kaminsky