Thursday, August 21, 2014

Dot Net Web Forms Project and Web Site

I have been doing Java development since 2001, and lately i have been taking in new languages such as Objective C, Swift, etc.  Recently, on a project I was working on used a Microsoft product called HealtVault. I figured its about time to learn the other flavor of web development, the one that using the Microsoft stack called Dot Net.

This page gave me the link to install the free version (called Express) of the Microsoft IDE called Visual Studio. So, I am off to races using Microsoft.

They say the Express Visual Studio is perfect for a single developer . Likewise, web world team foundation server is for enterprise ms.

  • The web matrix - easy for websites, publish, for a designer
  •  IIS - manage web server - 
  • msft families technologies to enable web development .net framework 4.0 - web forms. mvc, web forms dynamic data C# or VB 
  • web forms : greatest maturaity in, inhetritence model, page/controls , wysiwig, tool 
  • visual studio - web app project, web site 
  • MVC - code intensive, razor syntax, unit test support 
  • web pages - page rendering

web forms

visual studio
new project/open project
server explorer window on left sidebar

debug pulldown
create new site - create web app proj
aspx config asax

file new project
under installed templates
web category

asp net web application or empty one

give it name i.e. DemoWAP

on right is solution explorer

web pages in aspx extension


file -> close solution 

recent projects

create new page (web form with master page)

right click project -> add new item

web from with master page (i.e. template )

give it name TestPage.aspx asks which master (Site.master)

can  click on site master to see markup


build->  DemoWAP (creates DLL under bun , pdb file also)

right click view in browser

or start debug session

toolbox (server side controls) -> drag text box in code

add button  and a label 

use ids in code



App_Data folder - database file

Web.xonfig file estatblish conneection


server control to bind to


asp:listView ID="ListOfTasks" runat= "server  

<%#Eval('taskName' %>

Page_Load in DEmoWAP file


using (var conn= new SqlConnection(connString)

using (var cmd conn.createCommand

cmd.CommandTest = "Select * from Taks";

ListOfTasks.DataSource = cmd.EWxcecuteReader

web forms - instead now web sites
create new web site

view pulldown -> start page

Server explorer


create new site

file -> new -> web site

create new web form with master page
add new item -> web form with master page

uncheck seperate file

testPage : System.Web.Ui.Page

Label1.Text = 
also .cs files

No comments:

Post a Comment