Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Asp.Net Menu Querystring in navigateurl causes error

Posted on 2007-04-11
Medium Priority
Last Modified: 2013-11-07
<asp:MenuItem Text="Support" NavigateUrl="~/Support.aspx?product=fundtrackersql"></asp:MenuItem>
Message = "'~/Support.aspx?product=fundtrackersql' is not a valid virtual path."

Any Ideas??

Question by:picsnet
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 13

Accepted Solution

jeebukarthikeyan earned 2000 total points
ID: 18892973

have a look at this

<asp:Menu ID="Menu1" runat="server">
<asp:MenuItem Text="buddha" Value="jeebu" NavigateUrl="~/FormControls/clipboard.aspx?id=dd"></asp:MenuItem>

i think in ur code the path specifies is not correct

b u d d h a

Author Comment

ID: 18893133
I know what is happening.  I just now need a way to fix it.  It is only crashing when the method below occurs.  I call this in the masterpage page_load and it highlights the current page you are on in the menu in a special way.  I think I just need to strip out the querystring.  


  Public Sub SelectMenuItem(ByVal Items As MenuItemCollection)

    For Each objItem As MenuItem In Items

      If _FoundSelected Then Exit Sub

      If Page.Request.PhysicalPath.ToLower() = Page.MapPath(objItem.NavigateUrl).ToLower() Then
        objItem.Selected = True
        _FoundSelected = True
        objItem.Selected = False
      End If

      If objItem.ChildItems.Count > 0 Then
      End If


  End Sub
LVL 35

Expert Comment

ID: 18893198

<asp:MenuItem Text="Support" NavigateUrl="Support.aspx?product=fundtrackersql"></asp:MenuItem>

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question