I found that when i have a menu item with a value, but no nav link, in my table version it all worked fine,becuase i had post backs, but with the css adapter, i dont.
i propose, adding in the menuadapter.cs file begining at line 106
if
(item.NavigateUrl.Length > 0 || item.Value.Length > 0)
{
writer.WriteBeginTag(
"a");
if (item.NavigateUrl.Length > 0)
writer.WriteAttribute(
"href", Page.ResolveUrl(item.NavigateUrl));
else
writer.WriteAttribute(
"href", string.Format("javascript:{0};", Page.ClientScript.GetPostBackEventReference(menu, item.Value)));
the key here is that now i am checking for item.Value and if its there, and there is no nav url, i can assign a postbackreference.... perhaps this can be hanced to support some sort of clientscript control, currenlty, i just have it post back he value.
this creates a post back reference with the contronl, menu and a value.
then, i have several controls that use menu's in one way or another, and in each i attach to the page_load method, and put in something like
string evtTarget = HttpContext.Current.Request.Form["__EVENTTARGET"];
string evtArg = HttpContext.Current.Request.Form["__EVENTARGUMENT"];
string menuClick = this.TabMenu.ClientID.Replace("_", "$");
if(menuClick == evtTarget)
this._tabMultiView.ActiveViewIndex = Convert.ToInt16(evtArg);
in this example, i am setting a view on a multiview control.
what i meant about more client script control, was in this case... it leaves a lot of responsibilty on the decloper to put that handler in for the event match, plus value.....
i am not sure how i would extend the menu adapter, to say... have an event i can attach to to let me know the link that was fired for example. then in the server controls instead of doing something like myMenu.ItemClick += .....my method.
i would have something like ((MenuAdapter)myMenu).ItemClick += ... my event.....
i don't know, im sure there is a cleaner solution, any thoughts?