Rank: Member Groups: Member
Joined: 8/17/2007 Posts: 11
|
I am trying out this product in conjunction with learning .net so I'm not sure if I am limited in what I can do until I get a license or there is something wrong with my code.
In my .aspx file I am using the slide menu. I have set up the top level of the menu to have the RaisesEvent = True and one of the Items has been set to true (so I expect this will enable the event to be captured).
In my menu I have: <Items> <eo:MenuItem ExpandedStyle-CssText="" RaisesServerEvent="True" NormalStyle-CssText="background-color:#000066;color:white;" Text-Html="Junior School" CustomItemID="1"> <SubMenu Style-CssText=""> </SubMenu> </eo:MenuItem>
In my .vb file I have Imports EO.Wed and Imports EO.Web.Demo (amongst other Imports) I have declarations for: Protected lblMsg As Label (which will display info based on item clicked) Protected WithEvents Menu1 As EO.Web.Menu
The Event Handler is: Private Sub Menu1_ItemClick(sender As Object, e As EO.Web.NavigationItemEventArgs) Handles Menu1.ItemClick
lblMsg.Text = String.Format("Menu item '{0}' was clicked.", CType(e.NavigationItem, EO.Web.MenuItem).Text) End Sub
Is there something that I am missing within the .vb file or is it just that the unlicensed version doesn't allow for event handling?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I do not see anything wrong with your code. You only need to set the item's RaisesServerEvent to true (as you already did in your .aspx file) and it should work. License is not an issue as there is no feature restriction on unlicensed version. The only difference between licensed an unlicensed version is the license warning message.
If you set a break point in Page_Load or ItemClick, do you see the break point hit? Also make sure that you do not have NavigateUrl set. When you have NavigateUrl set, it takes you to another page instead of raising a server event. Another thing you want to check is whether there are other controls in your page that's canceling the post back (such as an validator control), a good way to verify this is try everything out on a blank page.
Please let us know if that still does not solve the problem. Thanks
|
Rank: Member Groups: Member
Joined: 8/17/2007 Posts: 11
|
Got it sorted. I forgot to add an id for the menu!!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Ah! Thanks for letting us know!
|