您有一个在母版页中设置的rad菜单,并在那里添加了所有网址/链接。
我正在尝试从我的aspx页面代码后面更改两个radMenuitems导航链接 D)用javascript点击事件替换链接。 E)当您单击然后触发vb.net void click事件
感谢
Protected Sub Page_Load(sender As Object, e As EventArgs)
Dim rmenu As RadMenu = DirectCast(Master.FindControl("mymenu"), RadMenu)
Dim D As RadMenuItem = DirectCast(rmenu.FindControl("dogs"), RadMenuItem)
Dim E As RadMenuItem = DirectCast(rmenu.FindControl("cats"), RadMenuItem)
D.NavigateUrl = nothing
E.NavigateUrl = nothing
D.click = "alert('you clicked on dogs')"
E.click = Button1_Click
End Sub
Protected Sub Button1_Click(sender As Object, e As EventArgs)
'do this for cats only
End Sub