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? 13 1650
"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?
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eo**************@TK2MSFTNGP05.phx.gbl...
"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...
I think the OP would like to see a list of events availble for an object,
e.g. if you didn't know that the Page_Init event existed then you'd have
trouble using it! In VB you can get a list of the object's events and when
you select one it will automatically create the handler for you. I can't see
similar functionality in C#. Do you know how to do this, as I'm also
interested!
With your page open in the IDE, select "Page" from the leftmost dropdown
above the code...and then select the available events from the dropdown to its right.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"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?
>
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?
Just a question about this difference ... is there any reason there isn't an
"event explorer" in c# as we've got in vb.net ??
Thanks in advance.
--
Gianluca Gravina http://blogs.ugidotnet.org/thinkingingrava
>
I think the OP would like to see a list of events availble for an object,
e.g. if you didn't know that the Page_Init event existed then you'd have
trouble using it! In VB you can get a list of the object's events and when
you select one it will automatically create the handler for you. I can't
see similar functionality in C#. Do you know how to do this, as I'm also
interested!
Well, by default starting writing "this." and let the intellisense show up,
then you can search for events (you've got an icon that it's quite
self-explanatory). By default if you've got an event like "PreInit", with
autoEventWireUp you can write the code Page_PreInit, if the attribute is set
to false you have to override the method that will raise the event:
override OnPreInit()
{
base.OnPreInit();
// my code
}
--
Gianluca Gravina http://blogs.ugidotnet.org/thinkingingrava
Yes, that's exactly the problem and what I'm after Leon!
"Leon Mayne" <leon@rmv_me.mvps.orgwrote in message
news:98**********************************@microsof t.com...
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eo**************@TK2MSFTNGP05.phx.gbl...
>"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...
I think the OP would like to see a list of events availble for an object,
e.g. if you didn't know that the Page_Init event existed then you'd have
trouble using it! In VB you can get a list of the object's events and when
you select one it will automatically create the handler for you. I can't
see similar functionality in C#. Do you know how to do this, as I'm also
interested!
If I type "this" in a page class, nothing happens. The only way I could do
that would be to go into an existing code block and type "this" to see the
intellisense dropdown. Then, I'd have to just know what is an event or an
overrideable event handler (which I can do). But, I was hoping for
something easier as in VB .NET, where you just select the top-left drop-down
in the code editor and then the top-right dropdown gives you the events for
the item in the left drop-down.
:(
"grava" <g_*******@hotmail.comwrote in message
news:96**********************************@microsof t.com...
I think the OP would like to see a list of events availble for an object, e.g. if you didn't know that the Page_Init event existed then you'd have trouble using it! In VB you can get a list of the object's events and when you select one it will automatically create the handler for you. I can't see similar functionality in C#. Do you know how to do this, as I'm also interested!
Well, by default starting writing "this." and let the intellisense show
up, then you can search for events (you've got an icon that it's quite
self-explanatory). By default if you've got an event like "PreInit", with
autoEventWireUp you can write the code Page_PreInit, if the attribute is
set to false you have to override the method that will raise the event:
override OnPreInit()
{
base.OnPreInit();
// my code
}
--
Gianluca Gravina http://blogs.ugidotnet.org/thinkingingrava
Hi Scott,
Yes, for the C# asp.net designer, the page level events list does be an
existing limitation(as VB.NET IDE are developed separately from C# one). I
really suggest you to submit your comments on this to our product feedback
site: http://connect.microsoft.com/feedbac...spx?SiteID=210
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Scott M." <sm**@nospam.nospam> References: <uh**************@TK2MSFTNGP06.phx.gbl>
<eo**************@TK2MSFTNGP05.phx.gbl>
<98**********************************@microsoft.co m>
<96**********************************@microsoft.co m>
>Subject: Re: Page Events Date: Wed, 16 Jan 2008 13:39:35 -0500
If I type "this" in a page class, nothing happens. The only way I could
do
>that would be to go into an existing code block and type "this" to see the intellisense dropdown. Then, I'd have to just know what is an event or an overrideable event handler (which I can do). But, I was hoping for something easier as in VB .NET, where you just select the top-left
drop-down
>in the code editor and then the top-right dropdown gives you the events
for
>the item in the left drop-down.
:(
"grava" <g_*******@hotmail.comwrote in message news:96**********************************@microso ft.com...
> I think the OP would like to see a list of events availble for an
object,
>>e.g. if you didn't know that the Page_Init event existed then you'd
have
>>trouble using it! In VB you can get a list of the object's events and when you select one it will automatically create the handler for you. I can't see similar functionality in C#. Do you know how to do this, as
I'm
>>also interested!
Well, by default starting writing "this." and let the intellisense show up, then you can search for events (you've got an icon that it's quite self-explanatory). By default if you've got an event like "PreInit",
with
>autoEventWireUp you can write the code Page_PreInit, if the attribute is set to false you have to override the method that will raise the event:
override OnPreInit() { base.OnPreInit(); // my code }
-- Gianluca Gravina http://blogs.ugidotnet.org/thinkingingrava
Thanks Steven, I'll do that.
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:MC**************@TK2MSFTNGHUB02.phx.gbl...
Hi Scott,
Yes, for the C# asp.net designer, the page level events list does be an
existing limitation(as VB.NET IDE are developed separately from C# one). I
really suggest you to submit your comments on this to our product feedback
site:
http://connect.microsoft.com/feedbac...spx?SiteID=210
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>From: "Scott M." <sm**@nospam.nospam> References: <uh**************@TK2MSFTNGP06.phx.gbl>
<eo**************@TK2MSFTNGP05.phx.gbl>
<98**********************************@microsoft.co m>
<96**********************************@microsoft.co m>
>>Subject: Re: Page Events Date: Wed, 16 Jan 2008 13:39:35 -0500
If I type "this" in a page class, nothing happens. The only way I could
do
>>that would be to go into an existing code block and type "this" to see the intellisense dropdown. Then, I'd have to just know what is an event or an overrideable event handler (which I can do). But, I was hoping for something easier as in VB .NET, where you just select the top-left
drop-down
>>in the code editor and then the top-right dropdown gives you the events
for
>>the item in the left drop-down.
:(
"grava" <g_*******@hotmail.comwrote in message news:96**********************************@micros oft.com...
>> I think the OP would like to see a list of events availble for an
object,
>>>e.g. if you didn't know that the Page_Init event existed then you'd
have
>>>trouble using it! In VB you can get a list of the object's events and when you select one it will automatically create the handler for you. I can't see similar functionality in C#. Do you know how to do this, as
I'm
>>>also interested!
Well, by default starting writing "this." and let the intellisense show up, then you can search for events (you've got an icon that it's quite self-explanatory). By default if you've got an event like "PreInit",
with
>>autoEventWireUp you can write the code Page_PreInit, if the attribute is set to false you have to override the method that will raise the event:
override OnPreInit() { base.OnPreInit(); // my code }
-- Gianluca Gravina http://blogs.ugidotnet.org/thinkingingrava
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eD**************@TK2MSFTNGP05.phx.gbl...
With your page open in the IDE, select "Page" from the leftmost dropdown
above the code...and then select the available events from the dropdown to
its right.
Sadly doesn't work in a C# ASP.NET project :-(
Scott: When you do add the enhancement request on connect, please post the
feedback Id on this thread so we can vote for it.
The Feedback ID is: 322994.
I've also posted this as a new thread in both the C# and the ASP .NET NG's
to hopefully attract more attention.
-Scott
"Leon Mayne" <leon@rmv_me.mvps.orgwrote in message
news:E4**********************************@microsof t.com...
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eD**************@TK2MSFTNGP05.phx.gbl...
>With your page open in the IDE, select "Page" from the leftmost dropdown above the code...and then select the available events from the dropdown to its right.
Sadly doesn't work in a C# ASP.NET project :-(
Scott: When you do add the enhancement request on connect, please post the
feedback Id on this thread so we can vote for it.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dan |
last post by:
When a user clicks on a link in my menu, I want the background color
of the link that comes up in the hover to remain on the destination
page.
My menu looks like this:
<div id="adminmenu">
<a...
|
by: Paolo Mancini |
last post by:
Hi all,
I have a page with many different elements: <a href="...."> ... </a>,
listboxes, radiobuttons, etc.
Can I use javascript to prevent the user from interacting with the
page? That is:...
|
by: John Lau |
last post by:
Hi,
Is there documentation that talks about the page lifecycle, the lifecycle of
controls on the page, and the rendering of inline code, in a single
document?
Thanks,
John
|
by: MaryA |
last post by:
I have an aspx page that loads twice inspite of using the IsPostBack
i removed all controls from the page and still the page_load event is called
twice
I appriciate any help coz i have lost...
|
by: Gummy |
last post by:
Hello,
I created a user control that has a ListBox and a RadioButtonList (and other
stuff). The idea is that I put the user control on the ASPX page multiple
times and each user control will...
|
by: Benton |
last post by:
Hi there,
I have a UserControl with a couple of textboxes and a couple of buttons
("Save" and "Cancel"). The Click event for this buttons is in the
UserControl's codebehind of course, so here's...
|
by: =?Utf-8?B?VDhS?= |
last post by:
Ok...I've been looking for an answer to this problem and can't seem to find
one...Framework 1.1 mind you.
I have a base class that inherits from UserControl. I have 5 and soon to be
12 user...
|
by: Jordan S. |
last post by:
I'm just wondering if this would work. Please note that I'm not asking *how*
to raise events. I'm clear on that. What I'm not clear on is the sequence in
which events are raised by custom controls...
|
by: Scott M. |
last post by:
How can I get Visual Studio 2008 Pro. to show me a list of the Page class's
events (as I can get in VB .NET)?
In the page designer, with the DOCUMENT selected in the Properties Window,
there is...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |