开发者

A simple asp.net feature

When I would be able to write :

<asp:Text开发者_StackOverflowBox id="Input" runat="server"/> <asp:Button onclick="<% Input.Text='my input' %>" />


Unfortunately with standard WebForms this simply isn't possible. The On<EventName> property expects a string which must correspond to the name of a method whose signature matches the event's handler delegate.

Essentially what you are describing is the ability to, inline, assign a lambda to be invoked when the event is raised. To add this functionality you would need to build your own ViewEngine to replace the existing WebForms one. This is hardly a trivial task, but it is possible, and it would be a very cool feature to have.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜