I have a ListView which I'm using to generate a table. I have a few cells with textboxes开发者_StackOverflow中文版 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.
You could also use HtmlForm.DefaultButton
property for this:
Page.Form.DefaultButton = "SubmitButton";
精彩评论