views:

50

answers:

1

Im have the default routing and write a link to the Homepage in my view

<a href="<%=Url.Action("Index" ,"Home")%>">Link</a>

The generated content is a forward slash.

<a href="/">Link</a>

This link works in Firefox but in IE8 no request is sent to the server when the link is clicked.

Is a forward slash a valid content in a link?

EDIT:

OMG, I tried to have an image inside the link but actually put an input type image there. The funny think is that it worked in Firefox. Thats how my linked looked like:

 <a href="/"> <input type="image" src="/Images/buttons/btn_buy_more.gif" alt="" /> </a>

I will leave this question here so you have somebody to laugh about.

A: 

Url.Action isn't supposed to send a request to the server. It just generates a link address. Look at the generated URI in the HTML source of the rendered page. I'll bet it's the same in both browsers.

What I think you mean is that clicking the link is behaving differently for you. To figure out why, use Fiddler to examine the request the browser sends and the server's response.

Craig Stuntz
Thnks, I edited the question.
Malcolm Frexner