tags:

views:

20

answers:

1
HtmlForm fMp = Master.FindControl("fMp") as HtmlForm;
            if (fMp != null)
            {
                fMp.DefaultButton = btnLogin.UniqueID;
            }

but when i press enter nothing happens. Any idea why?

if i use:

fMp.DefaultButton = "btnLogin";

then i get:

The DefaultButton of 'fMp' must be the ID of a control of type IButtonControl.

isn't LinkedButton part of IButtonControl. I google but no solution...

+1  A: 

Only Button and ImageButton controls are supported as DefaultButton.Check this msdn article if you need to confirm.

Vinay B R