The only adapter I have played with so for is the menu adapter, so changes were made there and not in ?WebControlAdapterExtender.vb? as I am not certain of the impact it would have on other adapters.
Made the following changes to MenuAdapter.vb in Sub routine BuildItem:
If (IsLink(item)) Then
writer.WriteBeginTag("a")
If (Not String.IsNullOrEmpty(item.NavigateUrl)) Then
' Begin script exception code
If (item.Target.StartsWith("javascript:")) Then
writer.WriteAttribute("href", Page.Server.HtmlEncode(menu.ResolveClientUrl(item.Target)))
item.Target = Nothing
Dim js As String = item.NavigateUrl.ToString
writer.WriteAttribute("onclick", js)
writer.WriteAttribute("onkeypress", js)
Else
' End script exception code
writer.WriteAttribute("href", Page.Server.HtmlEncode(menu.ResolveClientUrl(item.NavigateUrl)))
End If
Else
__________________________________________________________________________
In code behind:
' Set variable script popup name from PopName property in
' class instance and add hyperlink attributes
strPopUp = "popup_" & myPopup.PopName & "();focus();"
HyperLink1.Attributes("onclick") = strPopUp
HyperLink1.Attributes("href") = "javascript:void(0)"
' Set Menu adapter variables for specific menu item
Me.Menu1.Items(0).ChildItems(0).ChildItems(0).Target = "javascript:void(0);"
Me.Menu1.Items(0).ChildItems(0).ChildItems(0).NavigateUrl = strPopUp