By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,013 Members | 1,167 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,013 IT Pros & Developers. It's quick & easy.

Object events

P: n/a
In ASP.NET 2.0, C# I can see object events only in design view.

That is very disturbing. I don't use design view at all. I work with source
view and code behind.

If you change language to VB.NET that you can see events also in code
behind.

In asp.net 1.1 that works.

Any idea?

regards,S
Jan 10 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
if your talking about what I think ur talking, the way I do it is pretty
easy. First, I disable AutoWireUp. Then I override OnInit and I hook up my
events in there like it was in 1.1

protected override void OnInit(EventArgs e)
{
Send.Click += new EventHandler(Send_Click);
base.OnInit(e);
}
i actually changed the templates used in vs.net 2005, you can find them all:
C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\ItemTemplates\Web\CSharp\1033 and modify them. i had some
problems with the cache of those, located
C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\ItemTemplatesCache\Web\CSharp\1033
but it eventually all worked out,not quite sure how to be honest :)

Karl

--
http://www.openmymind.net/

"SimonZ" <si*********@studio-moderna.com> wrote in message
news:O5**************@TK2MSFTNGP11.phx.gbl...
In ASP.NET 2.0, C# I can see object events only in design view.

That is very disturbing. I don't use design view at all. I work with
source view and code behind.

If you change language to VB.NET that you can see events also in code
behind.

In asp.net 1.1 that works.

Any idea?

regards,S

Jan 10 '06 #2

P: n/a
Thank you Karl,

it's not what I mean.

In VS2003 you had 2 combo boxes on top: first one with objects and second
one with events.

When you selected the object from first combo box, the second combo box was
filled with the events of this object.

When you selected the some event from second combo box, the wrapper for this
event was automaticly added to your code.

Now in VS2005 it still works but only if you have VB as your language.

In C# that is gone. I don't know why?

Auto wire up is also something to think about. Maybe I'll try your way, but
it doesn't bother me a lot.

Thanks,
Simon

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:%2***************@tk2msftngp13.phx.gbl...
if your talking about what I think ur talking, the way I do it is pretty
easy. First, I disable AutoWireUp. Then I override OnInit and I hook up
my events in there like it was in 1.1

protected override void OnInit(EventArgs e)
{
Send.Click += new EventHandler(Send_Click);
base.OnInit(e);
}
i actually changed the templates used in vs.net 2005, you can find them
all:
C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\ItemTemplates\Web\CSharp\1033 and modify them. i had some
problems with the cache of those, located
C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\ItemTemplatesCache\Web\CSharp\1033
but it eventually all worked out,not quite sure how to be honest :)

Karl

--
http://www.openmymind.net/

"SimonZ" <si*********@studio-moderna.com> wrote in message
news:O5**************@TK2MSFTNGP11.phx.gbl...
In ASP.NET 2.0, C# I can see object events only in design view.

That is very disturbing. I don't use design view at all. I work with
source view and code behind.

If you change language to VB.NET that you can see events also in code
behind.

In asp.net 1.1 that works.

Any idea?

regards,S


Jan 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.