Creating a Website Using Visual Studio

Creating a Website Using Visual Studio

Creating a Website using Visual Studio

From Visual Studio, File -> New WebSite-> ASP.NET Empty Web Site

Browse and go to your web folder provided in the web server: sbus-web, and provide a new name for your web site. You can also create the project in the local PC and move files to the server.

You can create a new folder by clicking the new folder icon on top the following screen:

If you don’t provide a folder name, it will ask you for name, and provide a name like MyWebsite. You will see a screen like the following. Click Yes to create a new folder, and then OK to complete the process.

You will see the following screen with anempty website:

Three files are created in the web server folder: Default.aspx, Default.aspx.vb, and Web.

Right click on the empty website, and then add a form: MyWebsite -> Add ->Web Form

You can also do Add-> New Item to see the following screen, then select the Web Form. You can keep the name as Default.aspx or a new name. Keep Visual Basic as your programming language.

You could keep the code in a single ASPX file by uncheckingthe check box at the bottom.To keep the design and code in separate files, keep checked. Prefer single file. You will see the following with the Default.aspx file (form).

Develop you Form with required controls and VB code as desired. For example, from the file menu:

FORMAT->background color, and select a color from the palette to change the background color of the form.

To insert a table: TABLE - > Insert to insert a Table.

You can also insert few web controls and change colors (label, textbox, button, etc.) of table as shown below. Name the controls appropriately to use them in Visual Basic program.

Double click on the submit button to open the code view. Write your code as shown by example below.

You can view the page on the built-in browser in Visual Studio by clicking the debug button from the menu.

To view the page directly using a browser from anywhere, use the following full url:

You will see an authentication screen like the following. Provide your MIS userid and password.

The result is shown below along with the full url to the website: