简体   繁体   中英

How to Trigger an ItemInserting event of listview on Enter Key Press

我如何在同一行的文本框中输入一些值后,按Enter键触发行的asp.net Listview控件的iteminserting事件。

Well, it may be complicated. Any control that posts back sets the __EVENTTARGET and __EVENTARGUMENT params to determine what the control event was. You don't have to set those explicitly; you can use __doPostBack, which sets them. You have to use the UniqueID of the ListView for the target and whatever the listview expects for the argument (which can be a long concatenated string for some control types), something like:

__doPostBack("<%= list.UniqueID %>", "args");

The problem is what to supply to the args, and you would have to use RedGate Reflector or Telerik JustDecompile to do that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM