ASPnet pageEvents使用C#代码隐藏. [英] ASPnet pageEvents using C# code-behind.
问题描述
当我在后面使用VB代码构建ASP.NET页面时,可以获取页面的左侧菜单以选择PageEvents,而在右侧,可以获得该页面的所有可用事件(例如PreInit,LoadComplete,SaveStateComplete等). .我不能使用C#代码隐藏同样的事情,也没有其他写事件的方法,例如在属性窗口中,我单击事件按钮,它列出了页面支持的所有事件,然后双击所有事件并自动双击该事件.结构是用代码隐藏编写的.是否有任何技巧可以用C#自动编写页面的事件结构.
When I built ASP.NET page using VB code behind I can get the left menu of the page to select PageEvents and on the right side, I get all available events for the page(e.g PreInit,LoadComplete,SaveStateComplete etc.) . Same thing I can not do using C# code-behind and there are no other ways to write events, like In property window, I click event button and it lists all the events supported to page and then doubble-click any event and automatically that event structure is written in code-behind. Is there are any trick to write page''s event structure automaticlly in C#.
推荐答案
Dinesh,
另一种方法是:
转到类方法之间的某个位置并键入override
,然后按space
,会突然弹出智能感知"菜单,向您显示所有未实现的页面事件(因为它们是可重写的).
祝你好运
Hi Dinesh,
Another way is this :
Go somewhere between your class methods and typeoverride
and pressspace
suddenly intellisense menu pops up and shows you all of unimplemented page events(because they are overridable).
Good Luck
这篇关于ASPnet pageEvents使用C#代码隐藏.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!