473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

vs.net c# and control events

I have been using vb.net /asp.net for 2 years. I am
slowing switching over to c# and have 2 questions.

1.) Within vb.net I can go into asp.net project
properties and I can enter the imports once for the
project. Can I do this with a c# asp.net project? (or am
i forced to put using on each and every asp.net page?)

2.) Within vs.net with a vb.net project, while editing
the code behind file, i have 2 drop downs along the top
of the window, one for the controls that have been placed
on the page and the other one for events that can be
raised from the control. With a c# asp.net project I do
not see the control events drop down box. Where did it
go?

thank you very much
dave
Jul 21 '05 #1
11 1778
I also noticed that intellisense within the html code
editor is not working as it does with vb.net.

Is this true?
Jul 21 '05 #2

"dave" <dy@onlinelg.com> wrote in message
news:03****************************@phx.gbl...
I have been using vb.net /asp.net for 2 years. I am
slowing switching over to c# and have 2 questions.

1.) Within vb.net I can go into asp.net project
properties and I can enter the imports once for the
project. Can I do this with a c# asp.net project? (or am
i forced to put using on each and every asp.net page?)

2.) Within vs.net with a vb.net project, while editing
the code behind file, i have 2 drop downs along the top
of the window, one for the controls that have been placed
on the page and the other one for events that can be
raised from the control. With a c# asp.net project I do
not see the control events drop down box. Where did it
go?

thank you very much
dave


Hello, Dave.
I can deal with the event list for you.
With the GUI designer displayed, select the control you want events for,
then look at the top of the Properties Window. There you'll find a button
with a yellow lightning bolt icon. Click that button and the Properties
Window will display a list of events associated with the control you
selected. Double-click on the event you wish to create a handler for, and
the shell will be generated in your code.

--
Peter [MVP Academic]
Jul 21 '05 #3
Hello Dave,

Thanks for your post. I now share the following information with you:
1.) Within vb.net I can go into asp.net project properties and I can enter the imports once for the project. Can I do this with a c# asp.net
project?

Unfortunately, there is not such equivalent for C# project. We have an add
reference to the corresponding assemblies, and then add "using" line in C#.
I also noticed that intellisense within the html code editor is not

working as it does with vb.net. Is this true?

Based on my experience, the intellisense for HTML code editor in C# project
works properly. Please choose the menu "Tools" -> "Options", go to "Text
Editor" -> "HTML/XML" -> "HTML Specific" and make sure that the "Statement
Completion" are set properly.

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #4
Peter or others....

What you described worked however, I have become
acustomed to not using the designer.

Is there a way to see a list of events for the control
from the code view window? With vb.net all the events
are displayed in a drop down while in code view. (there
must be an equivalent in c#)

Help please.
Thank you
Jul 21 '05 #5

I am surprised that you are required to use the using on
every page. (this seems like a pain compared to the
vb.net world)

Regarding the intellisense. Thank you

I am in transition between vb.net (2 years experience) to
c#
Some of the nice things of vb.net just are not their with
c#.
Jul 21 '05 #6
Cor
Hi,

It is also in C#, but a little bit hidden.
You have to go to the properties page in the designer and push on the Flash
in top.
Than you can choose an event
And then it comes visible in the code view also.
Cor
Is there a way to see a list of events for the control
from the code view window? With vb.net all the events
are displayed in a drop down while in code view. (there
must be an equivalent in c#)

Jul 21 '05 #7
Peter or others....

What you described worked however, I have become
accustomed to not using the designer.

Is there a way to see a list of (all) events for a
control from the code view window?

With vb.net all the events are displayed in a drop down
while in code view. (there must be an equivalent in c#)

Help please.
Thank you

Jul 21 '05 #8
Hello Dave,
Is there a way to see a list of (all) events for a control from the code

view window?
Unfortunately, we can only see a list of all events in the property page in
C#.

Please feel free to let me know if any further is needed.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #9
Just to understand, you mean that the only way i can see
the list of events with c# is while in design view and
looking in the properties window?

If this is true, i do not like that.

thx
dave
Jul 21 '05 #10
> Just to understand, you mean that the only way i can see
the list of events with c# is while in design view and
looking in the properties window?


Not that it really helps, but you can also see a list of events via
Intellisense - i.e. when you type a period following an object's name (e.g.
treeViewList.) you can see all events for the object in the list that is
displayed (they're the ones with the lightning bolt next to them).

--
Thanks, Jeff
Jul 21 '05 #11
Hello Dave,
Just to understand, you mean that the only way i can see the list of

events with c# is while in design view and looking in the properties window?

Almost. As suggested by Jeff that you can also see a list of events via
IntelliSense, however, it is not able to generate event handling code for
you as properties window does.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Andrew | last post by:
Hi, friends, I need to raise certain events in my VC# windows control library. Any reference paper or sample source code for help? Thanks a lot...
2
by: dave | last post by:
Hi, I have a COM control / server I'm trying to get events from in my c# applications. 1) I'm trying to get events in both c# console apps and in c# winform apps. 2) I can call methods on the...
1
by: Earl Teigrob | last post by:
PROBLEM: When a user control is loaded into a PlaceHolder control more than once, the events do not fire on the first click of a control on the dynamically loaded user control. In other words, the...
2
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
1
by: Martin | last post by:
Hi, I have produced a custom server control that simple outputs a row of 26 buttons, one button for each letter of the english alphabet. now what I would like to do is catch the button click...
4
by: thomson | last post by:
Hi all, i do have a user control with 4 buttons, and all the events are firing properly, My problem is that i need to right an event handler in the user control, which gets fired after a...
2
by: Nathan Carroll | last post by:
Is it possible to loop through events of a control to determine which events are active? In other words I want to dynamically add controls that will be clones of controls I have placed in form...
0
by: Scott McChesney | last post by:
I have a problem I hope you folks can help me with. I have an application that is using a tab-based interface, with the ability for users to drag an item from a ListBox onto the tab control. ...
2
by: bretth | last post by:
In a VB.Net Windows Forms application, I have a user control that handles mouse events. Another section of code programmatically adds a label to the control. I would like label to ignore all...
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.