Home
aspMENU.net User Manual
Contents
1. aspM NU net User Manual Advanced Topics aspMENU net User Manual TABLE OF CONTENTS Advanced TOPICS i a raaa teat e eae aaa ah sek raana ate tates raaa aai 3 OV STIS W AAA EA AAT A E ETE Gudea 3 How do I use server side events cccsccccceccecceeeeeeeeeeeeeeneensenaeeeeeeeeeeeeeeess 3 Step 1 Set the Postback property ee ceeseceeeeeeeeeeeeeeeeeeeeeseeeeeeseeeeeeeeeeeeeeseeeeeeeeeeeeees 3 Step 2 Setup the Menultems you want to postback c ccccceceeeeeeeeeeeeceeeeeeeeeseseeaees 3 Step 3 Create the event Nandler cecceccccccececeeeeeeeeeecaeeeeeeeeeeseaeaaeeeeeeeseenesecesaeeseees 4 Step 4 Run the web application ceecccccecccceceeeeeeecenneeeceeeeeeseneneeeeeeeeeeeeeneneeeeeeeeeees 5 How do I setup permissions ous ctecesawuarecevnesiaes secs degeaeesns geod wnceathedentand duces steec 5 Step 1 Set the EnableAccessControlList property ceecccceesseeeeeeeeeeeeesesaaeeeeeeeeeeeeeaas 5 Step 2 Set the SessionNamMe Property eceecceeeeeeeeceeeenneeeceeeaeeeeeeaaeeeeeeaeeeeeeaeeseeenaas 5 Step 3 Specify access rights for Menultems and MenuGroups 2 eceeeeeeeeeeeeees 6 Step 4 Set the user group for the Current USP 2 eccecceeeeeeeseneeeaeceeceeeeeseseeeenaeeeeess 6 Step 5 Run the web application ccccceceeceeseceeeenneceeseaaeeeeeeeaeceeseaaaeeeseeeaeeeeseaeeeeeeaea 7 How do setup effects for My Menu 0 eee ee eeeeeeee
2. MenuGroup gt lt ASPMenu gt Figure 4 5 In Figure 4 1 the Edit and View Menultems have had their UserList property specified The Edit Menultem will only be visible to users who are a member of the NewUser or Admin group The View Menultem will only be visible to users who are a member of the Admin group All the other Menultems and MenuGroups will be available to all users Step 4 Set the user group for the current user Select the point in your web form s logic where you wish to set the user group for the current user this would be suited to a login page or similar Add an entry similar to the one shown in Figure 4 6 private void Page_Load object sender System EventArgs e Session ASPMenuUser NewUser Page 6 of 11 aspMENU net User Manual Figure 4 6 In Figure 4 6 ASPMenuUser corresponds to the SessionName property specified in Step 2 NewUser corresponds to a user group defined in the UserList property as specified in Step 3 The code in Figure 4 6 will make sure only the appropriate Menultems and MenuGroups are displayed to the current user Step 5 Run the web application You have now finished setting up permissions for your menu and can run the web application to see them in action The output produced by using the XML from Figure 4 5 and the code in Figure 4 6 is displayed in Figure 4 7 In this figure notice that the View Menultem isn t visible be
3. MenuItem Caption View Href PostBack gt lt MenulItem Caption Project gt lt MenuGroup gt lt ASPMenu gt Figure 4 1 In Figure 4 1 the File New and View Menultems have had their Href property set to PostBack This will cause these Menultems to cause a postback when they are clicked on Step 3 Create the event handler Select the instance of asoMENU net on your web form and double click on it This will create a method to handle the OnClick event generated by your menu This should add some code to the code behind the page for your web form similar to that displayed in Figure 4 2 private void ASPMenu2_Click object sender WebActive ASPMenu ASPMenuEventArgs e Figure 4 2 Now you can add some code to the event handler WebActive ASPMenu ASPMenuEventArgs supplies you with both the ClickediltemCaption and the ClickedltemID You can use this information as you see fit The example shown in Figure 4 3 contains the code to show the caption of the Menultem that was clicked on in a text box Page 4 of 11 aspMENU net User Manual private void ASPMenu2_Click object sender WebActive ASPMenu ASPMenuEventArgs e TextBoxl Text e ClickedItemCaption Figure 4 3 Step 4 Run the web application You have now finished setting up server side events for your menu and can run the web application to see them in action The output produced by using the
4. in my menu Step 1 Create an images folder Select your web application project from the solution explorer window This is shown in Figure 4 10 Solution Explorer Solution Tutorial 1 project EF Tutorial 3 References ASPMenuSchema xsd E AssemblyInfo cs Ad BluexP css Global asax 23 Tutorial xml E web config webForm1 aspx la Solution Explorer 24 Class View Figure 4 10 Click on Project g New Folder from the top menu A new folder will be added to the solution explorer and you can now type in a name for your folder We suggest that you call it images The solution explorer should now look similar to the one displayed in Figure 4 11 Page 9 of 11 aspMENU net User Manual Solution Explorer Tutorial 2 Ga a lo Solution Tutorial 2 1 project E lE Tutorial H Ss References ERES E ASPMenuSchema xsd E AssemblyInfo cs Ad BluexP css 4 Global asax fe Tutorial xml 53 Web config EE WebForm1 aspx wo Solution Explorer Figure 4 11 Step 2 Set the ImagesURL property Navigate to the ImagesURL property in the property grid and set it to the relative position of the images folder you created in Step 1 For example if we set up the images folder as shown in Figure 4 11 then we would type images without the quotes in the ImagesURL property Step 3 Add your images to the images folder Rig
5. XML from Figure 4 1 and the code in Figure 4 3 is displayed in Figure 4 4 In this Figure the View Menultem has been clicked on File gt Edit View Project View Figure 4 4 How do setup permissions Step 1 Set the EnableAccessControlList property Navigate to the EnableAccessControlList property in the property grid and set it to True Step 2 Set the SessionName property Navigate to the SessionName property in the property grid and set it to a value of your choice This property specifies the session variable name that holds the current user s group Page 5 of 11 aspMENU net User Manual Step 3 Specify access rights for Menultems and MenuGroups aspMENU net allows you to explicitly define the users groups permitted to see various Menultems and MenuGroups This is achieved through your DataSource by setting the UserList property of the Menultems and MenuGroups you want to limit access to An example of how to achieve this using XML is shown in Figure 4 5 lt xml version 1 0 encoding utf 8 gt lt ASPMenu xmlns http tempuri org ASPMenuSchema xsd gt lt MenuGroup gt lt Menultem Caption File gt lt MenuGroup gt lt MenuItem Caption New gt lt Menultem Caption Open gt lt MenuGroup gt lt MenulItem gt lt Menultem Caption Edit UserList NewUser Admin gt lt MenuItem Caption View UserList Admin gt lt MenulItem Caption Project gt lt
6. cause the current user doesn t have the appropriate permissions to view it File Edit Project Figure 4 7 How do setup effects for my menu Step 1 Set the ExpandEffect property Navigate to the ExpandEffect property in the property grid and set it to the effect of your choice Step 2 Set the EffectDuration property Navigate to the EffectDuration property in the property grid and set it to a value of your choice Page 7 of 11 aspMENU net User Manual Step 3 Run the web application You have now finished setting up effects for your menu and can run the web application to see them in action An example of this is shown in Figure 4 8 In this example the Pixelate effect has been chosen File b 2 Edit View Project Figure 4 8 How do I setup scrolling on my menu Step 1 Set the Scrollable property Navigate to the Scrollable property in the property grid and set it to True Step 2 Set the VisibleHeight property Navigate to the VisibleHeight property in the property grid and set it to a value of your choice Step 3 Run the web application You have now finished setting up scrolling for your menu and can run the web application to see the output An example of this is shown in Figure 4 9 In this example VisibleHeight has been set to 50 Page 8 of 11 aspMENU net User Manual File gt Edit View Project Figure 4 9 How do make use of images
7. eeesseeceeeeeeeesaeeeeeeeeneneneees 7 Step 1 Set the ExpandEffect property eeccceceseseeceeeeeeeeeeeeeeeeeeeeeeeeeeeeseeaeeeeeeaaeeeeeaas 7 Step 2 Set the EffectDuration property cc cceeseeeeeeeeeeeeeeeseeeeeeeeeeeeaeeeseeeeaeeeeeeaeeeeeeaaas 7 Step 3 Run the web application ceccseceeeeeseceeeenneeeeceecaeeeeeeeeeeeseaaeeeeeeeeeeeetsaeeeeeeaaa 8 How do setup scrolling On My MENU ccceeeeseeeeeeeeeeeeeeeeeteeesseeeeeeeeenes 8 Step 1 Set the Scrollable property aeset eian a a a aa 8 Step 2 Set the VisibleHeight property eee eeceeceeeeeeeeeeeeeeseeeeeeeeseeeeeeeseeeeeeeeeeeaaeeeeeeaaas 8 Step 3 Run the web application ceccseceeeeeseeeecenneeeeceecaeeeeeeeeeeeseaaeeeseeeaeeeesenaeeeeeeaaa 8 How do make use of images in My MENU oe eee eeeeee eee eeeetee eee eeeeeeteeeeeeeee 9 Step 1 Create an images folder eee eeeseeeeeeeneeeeeenneeeeeeeaaeeeeeeaaeeeeeeeaaeeeesesaeeeeseaaaeeeneaas 9 Step 2 Set the ImageSURL property eeeceeceeeeeneeeeeenneeeeeenaeeeeseaeeeeeeaaeeeseeaeeeeesaaes 10 Step 3 Add your images to the images folder ccccceseeeseceeceeeeeeeeeeeeeeeeeaeeeeeeeeeeees 10 Step 4 Set the image properties eee eeeeeeee essence eeeeeeneeeeeeeeeeeeeeeeaaeeeeeeeeeeeeeeaeeeeenaaas 10 Step 5 Setup individual images for MenulteMs cccceeeeeeeeeeceeceeeeeeeeeeeeneaeeeeeeees 11 Step 6 Run the web application ccccecceeee
8. ht click on the images folder in the solution explorer and click on Add g Add Existing Item You will be presented with a window that allows you to select your image files Navigate to the location of your image files and click Open Your image files should now be available in the images folder in the solution explorer Step 4 Set the image properties aspMENU net allows you to specify images for the NestedArrowlmage ScrollUpIimage ScrollDownlmage These can be set by writing the appropriate image name for each property in the property grid Page 10 of 11 aspMENU net User Manual Step 5 Setup individual images for Menultems aspMENU net lets you specify images for individual Menultems This is achieved by setting the Image property of Menultems in your DataSource An example of how to do this using XML is shown in Figure 4 11 lt xml version 1 0 encoding utf 8 gt lt ASPMenu xmlns http tempuri org ASPMenuSchema xsd gt lt MenuGroup gt lt Menultem Caption File Image sound gif gt lt MenuGroup gt lt MenuItem Caption New gt lt MenuItem Caption Open Image printer gif gt lt MenuGroup gt lt MenulItem gt lt MenuItem Caption Edit gt lt MenuItem Caption View gt lt Menultem Caption Project Image envelope gif gt lt MenuGroup gt lt ASPMenu gt Figure 4 11 In Figure 4 11 the File Open and Project Menultems have had their Image property set to a
9. n image contained in the folder specified in the ImagesURL property This will cause these three Menultems to have a left icon image Step 6 Run the web application You have now finished setting up images for your menu and can run the web application to see the output The output produced by using the XML from Figure 4 11 is displayed in Figure 4 12 44 File New Edit f Open View Project Figure 4 12 Page 11 of 11
10. sceeeeeeneeeeeeeaeeeeeeeneeeeeeaaeeeeeeeeeeeeeiaeeeeees 11 Page 2 of 11 aspMENU net User Manual ADVANCED TOPICS Overview This section explains how to use some of the more advanced features of aspMENU net Some of these features include e Server side events e Permissions e Effects e Scrolling e Images This section assumes that you have already added an instance of asoMENU net to your web form as described in the Initial Setup section It also assumes that you have already setup the content and style of your menu as explained in the Specifying Content and the Specifying Style sections How do I use server side events Step 1 Set the Postback property Navigate to the Postback property in the property grid and set it to True Step 2 Setup the Menultems you want to postback aspMENU net allows you to select the Menultems you want to cause a postback This is achieved by setting the Href property of these Menultems to PostBack through your DataSource An example of how to achieve this using XML is shown in Figure 4 1 Page 3 of 11 aspMENU net User Manual lt xml version 1 0 encoding utf 8 gt lt ASPMenu xmlns http tempuri org ASPMenuSchema xsd gt lt MenuGroup gt lt Menultem Caption File Href PostBack gt lt MenuGroup gt lt MenuItem Caption New Href PostBack gt lt Menultem Caption Open gt lt MenuGroup gt lt MenulItem gt lt MenuItem Caption Edit gt lt
Download Pdf Manuals
Related Search
Related Contents
Untitled アクティビティーノート アクティビティーノート〈第131 号〉 使用説明書 1 - Wacom Dataflex Katame CPU Holder Small User Manual MATERIEL NECESSAIRE : Kit GPI-S Prins 6 cylindres (ref Descargar ficha de producto Copyright © All rights reserved.
Failed to retrieve file