how to make search button works in search page ?

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Mar 24, 2011 at 5:09 AM

in my own blog i found a problem that in the search page. if i type something and press enter then they search for default word they already have suppose i want to search for doing that i type in search box and press enter then they search for Enter search term or APML url instead of words i put their. it's work if i click on search button instead of press enter using keyboard. for testing i check some other blog i implemented but they work fine elsewhere if i thing to see the mockup then they look like this.


my theme search block mockup is

<div id="searchpage">
      <input type="text" onkeypress="if(event.keyCode==13) SearchPage()" value="Enter search term or APML url" id="q" name="q">
      <input type="button" onkeypress="SearchPage()" onclick="SearchPage()" value="Search">
      <input type="checkbox" id="comment" name="comment"><label for="comment">Include comments in search</label>

How i can make them worked for change the thing i what  i need to done.