senzacionale
senzacionale

Reputation: 20906

LinkButton as Default Button

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...

Upvotes: 1

Views: 429

Answers (1)

Vinay B R
Vinay B R

Reputation: 8421

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

Upvotes: 1

Related Questions