Search This Blog

28 June, 2011

.NET for beginners

Objective to learn :-

CRUD(Create, Retrive, Update and Delete ) Operation and to develop a website.
Please follow some Steps to learn basic work of DotNet.
Install .net on your pc.


1. Create a folder in C - drive (eg. c:\Mayur)
2. Open Microsoft Visual Studio - > 


It will take some times to open, thus wait until getting open.
2.Create a new website using .Net 2010 SDK (Visual C#)
File - > New - > Website - > Visual C# - > Asp.Net




Choose any specified folder:-

You will see such type of form:-

 3. Add a new Item -> "Sql Server Database" from  Solution Explorer. 


 4. Double click to Database to open server explorer

5.Create a New table - Employee (Fields as decided)
id - PrimareKey (int)
Name- Char(20)
City- Char(20)




 6. Add a New Item- > DataSet - >EmpDataSet to the project.

7. Drag & Drop the Employee table on the dataset.
Employee Table Adapter class will be created by the SDK with following methods.
a. Insert
b.Delete
c.Update
d.GetData
We will not have to write SQL statements.








8.Save All
9. Add webForms:-
a. EmployeeAddForm
b. EmployeeEditForm
c. EmployeeViewForm
d. EmployeeDeleteForm




10. Add hyperlink to default.aspx form which is in solution explorer.
 1. Hyperlink - Add
 2. Hyperlink - Edit
 3. Hyperlink - View
 4. Hyperlink - Delete
 and also set their Negivation url (Right Click on Hyperlink property- Nevigation Url) properties to respective webforms.








11. On the Add/ Edit/ View/ Delete forms add a hyperlink (home) to take to the default.aspx page.
12. Set the start page as Default.aspx
13. Check the Navigation system.
14. Design the Employee Add form then Edit form then View then Delete form.

----------------------------------Thinking you----------------------------------- 



No comments:

Post a Comment

Meetme@