0

I have an ASP.NET web forms project. In a Mastre page I have an input:button and input:text . when click on input:button ,page refreshed. how can i solved it, I do not refresh a page because its not runat server contolr. my html code in master page:

 <li class="menusearch">
                        <input type="text" placeholder="جستجو..." class="txtsearch" />
                    </li>
                    <li>
                        <input type="image" src="/statics/images/search.png" class="btnsearch" />
                    </li>
mason
  • 31,774
  • 10
  • 77
  • 121
programmer
  • 83
  • 11

1 Answers1

0

W3C says that input type="image" defines a submit button with an image. Perhaps you should change that to button type="button" and then put an image element inside it. Ex:

<button type="button" class="btnsearch">
<img src="/statics/images/search.png" />
</button>

Then the button won't have a submit behavior, and it'll have an image inside of it. Alternatively, you could use CSS to set a background image on your button. See HTML / CSS How to add image icon to input type=“button”?

Community
  • 1
  • 1
mason
  • 31,774
  • 10
  • 77
  • 121