Monday 23 July 2012

Working With Asp.net Menu Control

Now I am going to show you how to work with an Asp.net server controls like menu, labels and text box etc.

1) So the First step is open an project. as we can see in the previous example, VWD has already created a default UI for us. and now we are going to modify it.

2)In the Solution Explorer(In your right hand side) you can see a tree view containing all the pages, directories etc.

3) And In the Left hand side you can see the Database Explorer and Tool box.

4)So now from Solution Explorer double click on Site.master page and you can see the site.master in Source view  (contains markup for site.master.).
We are not going to work on markup level, we are going to work on Designer level to achieve the VWD's event driven features.

5) Now In the bottom of the page you can see the tabs like Design, Split, Source. Click on Design Tab.



6) Once you clicked on Design view  you can see the same interface what you saw before in the browser.

7) Here you need to add a menu named Registration. so you need to select an asp:Menu control, which is already there in the form. and click on Edit Menu Items Option.

8) Once you clicked there you can see the Menu Item Editor. by clicking on Add a root item button you can add a menu.
9) Once you clicked that you can see a new node is added to the menu tree named New Item. Just select the new node and change the name to Registration by changing its Text Property and click on Ok.

10) Now You can see the Registration menu along with Home and About.

No comments: