Skip navigation

You would think a framework like ASP.NET, as big and popular as it is, would get the little things right.  It’s so simple, all I want to do is put an anchor around a button with an onclick.  Unfortunately, the anchor tag needs to be a server control because the onclick is generated dynamically on the server.  For whatever reason, .NET adds the path to the user control to the anchor tag’s href (if you don’t enter an absolute path yourself).  So for instance, all I wanted was #search for an anchor link.  .NET outputs it like so: http://serverpath/usercontrolpath/#search.  So ridiculous, I googled around and didn’t find much.  I ended up having to put the absolute path to the page and then the anchor.  Again, it’s so simple yet they (again) didn’t get it right.

Advertisements

One Comment

  1. use href=”#search” to have it working…
    My anchor link

    don’t put the NavigateUrl attribute of course.

    /tharn


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: