哪位懂C#的大神,请帮忙改成vb.net,谢谢!
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void MainMenu_MenuItemDataBound(object sender, System.Web.UI.WebControls.MenuEventArgs e) { if (e.Item.DataItem is SiteMapNode) e.Item.Target = (e.Item.DataItem as SiteMapNode)["Target"]; } // Adding this override so that the asp:Menu control renders properly in Safari and Chrome // See http://geekswithblogs.net/bullpit/archive/2009/07/08/aspmenu-rendering-problems-in-ie8-safari-and-chrome.aspx protected override void AddedControl(Control control, int index) { string str = Request.ServerVariables["http_user_agent"].ToLower(); if (str.Contains("safari") || str.Contains("chrome")) { this.Page.ClientTarget = "uplevel"; } base.AddedControl(control, index); }}