Echilon
Echilon

Reputation: 10254

ListView - DefaultButton

I have a ListView which I'm using to generate a table. I have a few cells with textboxes and a button which cuases a postback. If the textboxes were in a Panel, I know I could use the DefaultButton attribute, but if I wrap my in a panel I'll end up with invalid HTML. Is there any way UI can mimic the DefaultButton behavious in a ListView.

Upvotes: 3

Views: 326

Answers (1)

Oleks
Oleks

Reputation: 32333

You could also use HtmlForm.DefaultButton property for this:

Page.Form.DefaultButton = "SubmitButton";

Upvotes: 2

Related Questions