0

I'm trying to make a Html.Actionlink() that receive something and put it in a new tab, the problem is that the button is a input type. I have the input like this, <input type="submit" class="btnText" id="previewButton2" value="Preview" /> What I'm doing in the input do it in the ActionLink, but it's not working and I don't Know Why.@Html.ActionLink("Preview", "/", new { Id=Model.Id}, new { @class = "btnText", type = "submit", target = "_blank" })

How can I use the input tag in the ActionLink or what should I do that maybe work?

4

1 に答える 1

0

Your only option using your existing code would be to submit the form using Javascript onclick (but that isn't really good practice)

What you should really do is style your input button so that it looks like your a tag, then you can alleviate the need to use JavaScript to do what you need.

于 2013-01-21T12:06:44.807 に答える