Home

aspMENU.net User Manual

image

Contents

1. aspM NU net User Manual Specifying Content aspMENU net User Manual TABLE OF CONTENTS Specifying Content viccecececcsecatsicctseictadeecsesatetecenctabidediccsnzeiedesouetegecenetsecivesaisiacveezes 3 OEE A E E A E A E E headed 3 How do setup menu content through a new XML file eceeeeeeeeeeeeeeeeee 3 Step 1 Set the DataSource Property eecceceeeeeeeeeeeeeeeeeeeseeeeeeeeeeeeeeeeseeeaaeeseeeaeeeeneaees 3 St ep 2 Create a new XML File ernennen a eaaa e aaa a a a aa aaae aE 3 Step 3 Add the ASPMenu schema ccccceceeeeeceeceeeeeeeeceeeeeeeeeeeeeeeeeeneeeeeeeeeeeesesenaees 4 Step 4 Specify the target schema in the XML file cccceeceeeeeeeeceeceeeeeeeeeeeeeeeeeeeeeeees 5 Step 5 Specify menu content eee ee ceeeeceee cee eeeeeeeeeeeceaeeeeeeeeeesesaeaaeeeeeeeseeseseeeeseeeeeeeten 6 Step 6 Set the XMIFile property eiaa A E I AEAN 7 Step 7 Run the web application eceecceeeeeseeeeceecneeeeeeeeeeeeeeaaeeseeeaeeeeeeeeeeeseeaaeeeeees 7 How do setup menu content through an existing XML file eee 7 Step 1 Set the DataSource property ceeccceeeeseeeeeeeeeeeeeeseeceeeeeeeeeeeeeeeeaeeeeeeeeaeeeeneaees 7 Step 2 Add an existing XML File c ceeeeseceeeeeeeeceeeeeeeeeeeeeaeeeeeeseeeeeeeseeeeeeeeseneeeeeeeneeees 8 Step 3 Set the XMIFile Property eee eeeeeeeeeeeceeeeeeeeeeeeeeeeeeeseeaeaeeeeeeeeeeeseeeaaeeeeeeeeeeeneaees 8 Step 4 Run the web applic
2. as set up in Figure 2 12 Specifically the ParentMenultem must be the last attribute in the MenuGroup relation and the MenuGroup attribute must be the last attribute in the Menultem ASPMenu Page 11 of 13 aspMENU net User Manual ASPMenu Menultem Menultem Menultem File RootGroup Menultem2 Edit RootGroup Menultem3 View RootGroup Menultem4 Project RootGroup Menultem5 New _ Item1Group Menultem6 Open lltem1Group ParentMenultem RootGroup CEA lltem1Group Menultem Figure 2 12 Step 3 Add database file to your web application Ignore this step if your database is available on an external server Click on File g Add Existing Item from the top menu You will be presented with a window that allows you to select your database file Navigate to the location of your database file and click Open Your database file should now be available in the solution explorer Step 4 Define the connection string You now have to define the connection string for your database To achieve this navigate to the section of your code where you want to connect to the database probably the Page_Load event and define the DatabaseConnectionString property of your menu Figure 2 13 shows an example of how to do this for a MSAccess database Note the connection string using in this Figure is only appropriate for MSAccess databases Page 12 of 13 aspMENU net User Manual prot
3. content of your menu aspMENU net allows you to set up your menu s content through an XML file through a database connection or programmatically This section assumes that you have already added an instance of asoMENU net to your web form as described in the Initial Setup section How do I setup menu content through a new XML file Step 1 Set the DataSource property Navigate to the DataSource property in the property grid and set it to XML Step 2 Create a new XML File Click on File g Add New Item from the top menu A window similar to the one shown in Figure 2 1 should be displayed to you Page 3 of 13 aspMENU net User Manual Add New Item Tutorial a x Categories Templates lt q Web Project Items HTML Page Frameset Style Sheet Ba p XML File XML Schema XSLT File Me Web Custom Code File Static Control Discovery File x 4 blank XML file Name XMLFile1 xml Gren cares He Figure 2 1 Select the XML File icon type in a Name and click Open A new XML file has now be added to your project Step 3 Add the ASPMenu schema Click on File g Add Existing Item from the top menu You will be presented with a window that allows you to select the ASPMenuSchema xsd file Navigate to the location where you installed asoMENU net by default asoMENU net will be installed in C Program Files WebActive Corporation ASPMenu NET select the ASPMenuSche
4. ation cceccecceeeeeseececennneeeeeeeeeeeeeeaaaeeseeeaeeeeeeeaeeeeeeeaaeeeeees 8 How do setup menu content programmatically cccceeeeeeeeeeeeeeeeeeeeees 8 Step 1 Set the DataSource property ee ceceeceeeeeeeeeeeeeeeeeeseeeeeeeeeeeeeeeeseeeaaeeseeeateeeeeaees 8 Step 2 Add a reference to the WebActive NAMESPACE ee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 8 Step 3 Build the menu programmatically ceceeceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaaeeeeeeeaeeeeeeaas 9 Step 4 Run the web application cccecceeeeeeeceecesneeeesenaeeeeeeeeeeeseaaeeeseeeaeeeeeeaeeeeee 10 How do setup menu content through a database connection 4 10 Step 1 Set the DataSource Property eeeecceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaaeeeeeeaeeeeneas 10 Step 2 Create your database ccccceeeeceeccecceceeeeeseeaaaneceeceeeeeeecaeaaeceseeeeeeeeeeaaaaeeeeees 10 Step 3 Add database file to your web application Ignore this step if your database is available on an external server eeeceeeeeecceeeeeeeeeeeeeeeeeeeeeseeeeeesaaaeeeeeeeneeeeeeeeeeeeneneeeees 12 Step 4 Define the CONNECTION SHTING eeeeeeeeeeeeee eee eeeee eee eeeeeaeeeeeeeeeeeeeeeaaeeeeeeaaeeeeeeas 12 Step 5 Run the web application cccccceeeeeseceeeenneeeeceeaeeeeeeeeeeeseaaeeeseseaeeeeetnaeeeeee 13 Page 2 of 13 aspMENU net User Manual SPECIFYING CONTENT Overview This section explains how to setup the
5. eGroup Add items to the childgroup of Iteml subgroupl Items Add item5 subgroupl Items Add item6 Figure 2 9 Step 4 Run the web application You have now finished setting up the content of your menu and can run the web application to view the menu The output produced by using the code supplied in Figure 2 9 is displayed in Figure 2 10 File gt New Edit Open View Project Figure 2 10 How do I setup menu content through a database connection Step 1 Set the DataSource property Navigate to the DataSource property in the property grid and set it to Database Step 2 Create your database To specify menu content through a database asoMENU net requires you to create your database with predefined relations These relations their relationships and their attributes are shown in Figure 2 11 Page 10 of 13 aspMENU net User Manual EffectDuration ExpandEffect GroupCss Opacity Width ScrallHeight UserList TextIndent ParentMenultem EnableAccessControlLis NestedArrowImage PostBack Scrollable NNJavaScriptFile Figure 2 11 Some example relations are shown in Figure 2 12 Please note that in these relations only the attributes that contain a value have been included When setting up your database please make sure that you include all the attributes for every relation even if they are NULL Also we recommend that you follow the order of the attributes
6. ected WebActive ASPMenu ASPMenu ASPMenul private void Page_Load object sender System EventArgs e ASPMenul1 DatabaseConnectionString Provider Microsoft JET OLEDB 4 0 DataSource Server MapPath aspmenu mdb Figure 2 13 Step 5 Run the web application You have now finished setting up the content of your menu and can run the web application to view the menu The output produced by using the relations supplied in Figure 2 12 is displayed in Figure 2 14 File gt New Edit Open View Project Figure 2 14 Page 13 of 13
7. ial public class WebForml using WebActive ASPMenu System Web UI Page Figure 2 8 Step 3 Build the menu programmatically You are now ready to build your menu programmatically To achieve this navigate to the section of your code where you want to create the menu probably the Page_Load event Now you can start defining your menu s content by creating Menultems and adding them to MenuGroups Figure 2 9 shows an example of how to achieve this m System ASP ASP ASP ASP ASP ASP protected WebActive ASPMenu ASPMenu ASPMenul Menul Menul private void Page_Load object sender Create the RootGroup for the menu ASPMenul RootGroup Create the MenuItems MenulItem iteml new nuit iteml Caption File MenulItem item2 new nuit item2 Caption Edit MenuItem item3 new nuit item3 Caption View MenulItem item4 new nuit item4 Caption Project MenuItem item5 new nuit item5 Caption New MenuItem item6 new nuit item6 Caption Open Add items to the RootGroup Menul new MenuGroup ASPMenul di EventArgs e i Page 9 of 13 aspMENU net User Manual ASPMenul RootGroup Items Add ASPMenul RootGroup Items Add ASPMenul RootGroup Items Add ASPMenul RootGroup Items Add item1 item2 item3 item4 Make a child group for item1 MenuGroup subgroupl iteml Mak
8. ma xsd file and click Open The ASPMenuSchema xsd file should now be available in the solution explorer as displayed in Figure 2 2 Page 4 of 13 aspMENU net User Manual Solution Explorer Tutorial 2 a amp leo Solution Tutorial 1 project 3 G Tutorial 5 esate my Rear cs 4 Global asax 23 Tutorial xml 53 web config WebForm1 aspx w Solution Explorer Figure 2 2 Step 4 Specify the target schema in the XML file Double click on the XML file you just created This should open the XML file ready for editing Right click anywhere within the XML editing window and select Properties see Figure 2 3 View Data Cut Copy _ Delete Create Schema Synchronize Document Outline Add Task List Shortcut Figure 2 3 You should now be presented with a window that allows you to select your target schema In the Target Schema combo box select http tempuri org ASPMenuSchema xsd and click OK This is displayed in Figure 2 4 Page 5 of 13 aspMENU net User Manual DOCUMENT Property Pages E x General Target Schema O E A EE EN Encoding Unicode UTF 8 x Cancel Apply Help Figure 2 4 Step 5 Specify menu content You are now ready to setup the content for your menu This is an easy process if the previous steps have all been completed correctly It is done by using a combination of the ASPMenu MenuGro
9. up and Menultem elements to define the menu structure and the Caption attribute of the Menultem element to define menu content Some sample XML is shown in Figure 2 5 lt xml version 1 0 encoding utf 8 gt lt ASPMenu xmlns http tempuri org ASPMenuSchema xsd gt lt MenuGroup gt lt MenulItem Caption File gt lt MenuGroup gt lt MenuItem Caption New gt lt MenuItem Caption Open gt lt MenuGroup gt lt MenulItem gt lt MenulItem Caption Edit gt lt MenuItem Caption View gt lt MenuItem Caption Project gt Page 6 of 13 aspMENU net User Manual lt MenuGroup gt lt ASPMenu gt Figure 2 5 Step 6 Set the XmIFile property Navigate to the XmlFile property in the property grid and set it to the relative location of the XML file you just created and edited For example if you called your XML file myxml xml and placed it in the root directory of the web application then you would type myxml xml without the quotes in the XmlFile property Step 7 Run the web application You have now finished setting up the content of your menu and can run the web application to view the menu The output produced by using the XML supplied in Figure 2 5 is displayed in Figure 2 6 File gt New Edit Open View Project Figure 2 6 How do I setup menu content through an existing XML file Step 1 Set the DataSource property Na
10. vigate to the DataSource property in the property grid and set it to XML Page 7 of 13 aspMENU net User Manual Step 2 Add an existing XML File Click on File g Add Existing Item from the top menu You will be presented with a window that allows you to select your XML file Navigate to the location of your XML file and click Open Your XML file should now be available in the solution explorer Step 3 Set the XmIFile property Navigate to the XmIFile property in the property grid and set it to the relative location of your XML file For example if you XML file is called myxml xml and it is located in the root directory of the web application then you would type myxml xml without the quotes in the XmlFile property Step 4 Run the web application You have now finished setting up the content of your menu and can run the web application to view the menu How do I setup menu content programmatically Step 1 Set the DataSource property Navigate to the DataSource property in the property grid and set it to Programmatic Step 2 Add a reference to the WebActive namespace Go to the code behind the page for your web form and add a reference to the WebActive namespace This is achieved by adding using WebActive ASPMenu without the quotes to the top of your web forms logic An example of this is shown in Figure 2 8 Page 8 of 13 aspMENU net User Manual using System namespace Tutor

Download Pdf Manuals

image

Related Search

Related Contents

LG Electronics LFC28768ST Use and Care Manual  36kV 交流遮断器仕様書  PM2500  Riscaldatori a cassetto • INSTALLAZIONE • USO - Alto    Bulletin No: 07-1019-1 -- DigiViewer Live Video Troubleshooting  Affiche pour les écoles et les entreprises  取扱説明書 - MakeShop  

Copyright © All rights reserved.
Failed to retrieve file