How can I use the button tag with ASP.NET?

前端 未结 7 1481
天命终不由人
天命终不由人 2020-11-28 03:33

I\'d like to use the newer

相关标签:
7条回答
  • 2020-11-28 04:14

    I've been struggling all day with this -- my custom <button/> generated control not working:

    System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client

    What happens is that .Net adds a name attribute:

    <button type="submit" name="ctl02" value="Content" class="btn ">
       <span>Content</span>
    </button>
    

    The name attribute throws the server error when using IE 6 and IE 7. Everything works fine in other browsers (Opera, IE 8, Firefox, Safari).

    The cure is to hack away that name attribute. Still I haven't figured that out.

    0 讨论(0)
提交回复
热议问题