Enter Key in ASP.NET TextBox Control

 

Easy solution for default button

There is a free component that allows you to assign a button to the “enter-pressed” client side event of input controls. If you type some text in textbox and press Enter, the form will postback, and the serverside click event of your button is fired. You don’t need to write any code, but you only need to use this control’s “DefaultButton” property. It you are a beginner programmer this could be a life saver. More about MetaBuilders DefaultButtons Control you can find at http://www.metabuilders.com/Tools/DefaultButtons.aspx

Default buttons in ASP.NET 2.0 and ASP.NET 3.5

ASP.NET 2.0 makes this problems easier and introduce a concept of a “default button”. New defaultbutton attribute can be used with <form> or <asp:panel> control. What button will be “clicked” depends of where actually cursor is and what button is chosen as a default button for form or a panel.

Here is sample HTML code that contains one form and one panel control:

<form defaultbutton=”button1″ runat=”server”>
    <asp:textbox id=”textbox1″ runat=”server”/>
    <asp:textbox id=”textbox2″ runat=”server”/>
    <asp:button id=”button1″ text=”Button1″ runat=”server”/>
    <asp:panel defaultbutton=”button2″ runat=”server”>
        <asp:textbox id=”textbox3″ runat=”server”/>
        <asp:button id=”button2″ runat=”server”/>
    </asp:panel>
</form>

ASP.NET Tutorials: Enter Key in ASP.NET – Complete Research

Enter and the Button Click Event

 

Of particular interest to ASP.NET developers, though, is that when creating an ASP.NET Web Form hitting Enter to submit the form seemingly sometimes causes the page’s Button Web control’s Click event to fire, and other times not. In this short article we’ll see under what conditions a Button Web control’s Click event might not fire when the user submits the page hitting Enter; furthermore, we’ll look at a workaround. Read on to learn more!

Via ASP.NET.4GuysFromRolla.com: Enter and the Button Click Event

 

p.s. For additional information about Enter and form submission, as well as JavaScript techniques for disabling submissions via Enter and ensuring submissions via Enter (for older browsers), be sure to check out the following articles:

ASP.NET Extensionless URL ReWriting in IIS 7

 

The one that I’ve used and highly recommend is UrlRewriting.net. (There is another one – also free – called UrlRewriter.net but one that I’ve had not too great experiences with.)

To get UrlRewriting.net to work, simply Add Reference the provided DLL into the ASP.NET Visual Studion Project.  Next edit Web.config and make changes on the

<configSections>, <system.web>, <system.webServer>, finally create a new section, <urlrewritingnet> in which you’ll add the “rules” for the rewriting

image

image

image

image

Also take a look at the article by ScottGu: http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

Yahoo! Search BOSS (Build your Own Search Service) FAQ’s

 

Abstract

Yahoo! Search BOSS (Build your Own Search Service) is an initiative in Yahoo! Search to open up Yahoo!’s search infrastructure and enable third parties to build revolutionary search products leveraging their own data, content, technology, social graph, or other assets. This release includes Web, News, and Image Search as well as Spelling Suggestions.

FAQ’s

  1. What is BOSS and what can it do for you?

    BOSS (Build your Own Search Service) is an API to tap into Yahoo’s prized search infrastructure. It allows developers, start ups and established consumer Internet companies to leverage the power of Yahoo!

  2. How is BOSS different from other APIs?

    There are plenty of APIs out there in the search space. Some of them give you an iframe or a widget. The current Search API is designed for rapid development of search applications and mash ups. BOSS is an extension of that concept but for the first time developers can tap into our search infrastructure and build applications for commercial use without restrictions around presentation or ordering of results. You can take BOSS results, blend in your own secret sauce, and build a search engine of your own design, all without required brand attribution.

  3. Which search content can I find through BOSS?

    With this first release of BOSS developers can fetch search content for Web, News, Image, and Spelling Suggestions. Other search verticals and data sources are coming soon.

FAQ’s