Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Help with 'Enter' Key

Last post 11-29-2007, 10:30 AM by carlcamera. 1 replies.
Sort Posts: Previous Next
  •  05-08-2007, 9:54 AM 29545

    Help with 'Enter' Key

    Hi Guys,

    I have a textbox (for a search engine) and a linkbutton when entered data in the search box and pressed 'enter' key, I want it to take the input. I tried the following code but I ran into errors saying "namespace/ assembly not recognised" Please help:

      private void KeyPress(object sender, KeyPressEventArgs e)
        {
      if(e.KeyChar == Keys.Enter)
         {
         Search_Command();
         }
         }

    I get an error for "KeyPressEventArgs "

     Thanks in advance

  •  11-29-2007, 10:30 AM 37075 in reply to 29545

    Re: Help with 'Enter' Key

    Your method that receives a  KeyPressEventArgs event is a Windows Forms method and not and ASP.Net event handler and does not handle Postback events from ASP.Net web pages.  Could you explain further the setup and the goals you're trying to accomplish?  Thanks.
    Sincerely,

    Carl
    -----
    vine type - content management with standards in mind - vinetype.com
    -----
View as RSS news feed in XML