c# - MVC Razor open a new link not opening -


i using mvc4 , , in razor engine have typed view. have lot of validation , figured have link open newly spawned browser page, not happening.

what doing wrong?

<a target="_blank" href="http://fedgov.dnb.com/webform/displayhomepage.do">@html.labelfor(m=>m.duns)</a> 

edit:

showing view source code

<form action="/account/register" method="post"><input name="__requestverificationtoken" type="hidden" value="oef9gvp__m0yxnceshixskbit1oegj3ks5bogarw-rhsegxkdmujjery3dkivf48uzllvlfi9bvfxgiljgq4ymi_uhza1klqx8yv2x3lazm1" />    <div class="box-content nopadding">     <tr>                         <td class="width30">                             <a target="_new" href="http://fedgov.dnb.com/webform/displayhomepage.do"><label for="duns">duns #:</label></a>                             <span class="tooltip-top helper" title="click on labels learn more duns, cage, sic , naics"><i class="icon-info-sign"></i></span>                                         </td> 

enter image description here

clicking on link "duns" jumps highlighting validation required textbox, doesn't display numbers required text etc... seems bit odd.

maybe caused label?

this (your original snippet) doesnt work me...

<a target="_new" href="http://fedgov.dnb.com/webform/displayhomepage.do"><label for="duns">duns #:</label></a>   

but does...

<a target="_new" href="http://fedgov.dnb.com/webform/displayhomepage.do">duns #:</a>  

edit: works me...

<label for="duns"><a target="_new" href="http://fedgov.dnb.com/webform/displayhomepage.do">duns #:</a></label> 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -