Ramani Sandeep's Blog

DotNetting – Fast , Easy Way of Developing Applications

Archive for the ‘Error & Solutions – ASP.NET’ Category

Using Panel.DefaultButton property with LinkButton control in ASP.NET

Posted by Ramani Sandeep on April 3, 2010

ASP.NET has great limitation — only one server form on the page. Even if you are developing complex page, which looks like several forms with different submit buttons, in fact you have only one form.

So we have a problem:

How browser understanding which button should be triggered when user pressed ENTER?

It uses first Button control (usually that’s wrong), and if you have LinkButton’s, they would never be triggered.

In ASP.NET 2.0 new property has been added to the Panel  and HtmlForm controls — DefaultButton, which can be used to specify ID of the control, which implements IButtonControl  interface (usually Button and LinkButton). This button control would be triggered when user pressed ENTER.

But there is one big problem exist:

LinkButton control would not be triggered in Firefox on ENTER.

In this article I will show why this problem take place and how to solve it.

Read the full article here

Hope this helps !!!

Jay Ganesh

Posted in Error & Solutions - ASP.NET | Tagged: , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 37 other followers