页面事件 [英] Page Events
问题描述
在VS 2005 ASP .NET Web应用程序项目(WAP)中,如何查看页面(Web表单)事件的列表
(即new,init,loadviewstate,load,
saveviewstate等)并为它们设置事件处理程序?
" Scott M." < sm ** @nospam.nospamwrote in message
news:uh ************** @ TK2MSFTNGP06.phx.gbl ...
< blockquote class =post_quotes>
在VS 2005 ASP .NET Web应用程序项目(WAP)中,如何查看页面(Web表单)事件列表
(即新的,init,loadviewstate,load,
saveviewstate等)并为它们设置事件处理程序?
在代码隐藏文件中,选择(FormName)事件。在
右上角的下拉菜单中,所有表格的活动将在
的下拉列表中列出。
" Scott M." < sm ** @ nospam.nospamwrote in message
news:呃************** @ TK2MSFTNGP06.phx.gbl ...
< blockquote class =post_quotes>
在VS 2005 ASP .NET Web应用程序项目(WAP)中,如何查看页面(Web表单)事件列表
(即新的,init,loadviewstate,load,
saveviewstate等)并为它们设置事件处理程序?
不太清楚你的意思是什么看到事件......?
至于为他们设置事件处理程序,只需开始输入...
例如如果你想要一个Page_Init事件,只需在你的
代码隐藏中键入以下内容:
protected void Page_Init(object sender,System.EventArgs e)< br $>
{
}
并添加一些代码...
-
Mark Rae
ASP.NET MVP
http://www.markrae.net
" Leon Mayne" < leon@rmv_me.mvps.org写信息
新闻:C5 **************************** ****** @ microsof t.com ...
" Scott M." < sm ** @nospam.nospamwrote in message
news:uh ************** @ TK2MSFTNGP06.phx.gbl ...
< blockquote class =post_quotes>
>在VS 2005 ASP .NET Web应用程序项目(WAP)中,如何查看页面(Web表单)事件列表(即new,init) ,loadviewstate,load,
saveviewstate等)并为它们设置事件处理程序?
在代码隐藏文件中,选择"(FormName)Events"在
右上角的下拉列表中,所有表格'的事件将在
的下拉列表中列出。
看看你的其他帖子,我看到你使用的是C#,而不是VB.NET。在那个
的案例中,上述方法不起作用。在C#中不确定。您可以在班级查看器中查看
对象的事件吗?
In a VS 2005 ASP .NET Web Application Project (WAP), how can I see a list of
the page (web form) events (i.e. new, init, loadviewstate, load,
saveviewstate, etc.) and set up event handlers for them?
"Scott M." <sm**@nospam.nospamwrote in message
news:uh**************@TK2MSFTNGP06.phx.gbl...In a VS 2005 ASP .NET Web Application Project (WAP), how can I see a list
of the page (web form) events (i.e. new, init, loadviewstate, load,
saveviewstate, etc.) and set up event handlers for them?In the code behind file, select "(FormName) Events" in the dropdown in the
top right, and all the form''s events will be listed in the dropdown to the
right.
"Scott M." <sm**@nospam.nospamwrote in message
news:uh**************@TK2MSFTNGP06.phx.gbl...
In a VS 2005 ASP .NET Web Application Project (WAP), how can I see a list
of the page (web form) events (i.e. new, init, loadviewstate, load,
saveviewstate, etc.) and set up event handlers for them?Not quite sure what you mean about "seeing" the events...?
As for setting up event handlers for them, just start typing...
E.g. if you want a Page_Init event, just type the following into your
code-behind:
protected void Page_Init(object sender, System.EventArgs e)
{
}
and add some code...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
"Leon Mayne" <leon@rmv_me.mvps.orgwrote in message
news:C5**********************************@microsof t.com..."Scott M." <sm**@nospam.nospamwrote in message
news:uh**************@TK2MSFTNGP06.phx.gbl...>In a VS 2005 ASP .NET Web Application Project (WAP), how can I see a list
of the page (web form) events (i.e. new, init, loadviewstate, load,
saveviewstate, etc.) and set up event handlers for them?
In the code behind file, select "(FormName) Events" in the dropdown in the
top right, and all the form''s events will be listed in the dropdown to the
right.Looking at your other post, I see that you''re using C#, not VB.NET. In that
case the above method won''t work. Not sure in C#. You could look at the
object''s events in the class viewer?
这篇关于页面事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!