473,386 Members | 1,817 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,386 software developers and data experts.

I'm lost, comming from VB to c#

I'm doing some c# in VWD.
In VB-mode i can select a page event and VWD inserts the call for me.
Why isn't this in c# ?
What's the best way to do this?
Feb 16 '06 #1
3 1044
Ya...it's a nice feature of VB.NET. The best way to do it in C# is to hand
code it :)

intellisense will often kick in if you simply type in the word "override"
witin a class where you want ur method.

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

"Edwin Knoppert" <ne**@hellobasic.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
I'm doing some c# in VWD.
In VB-mode i can select a page event and VWD inserts the call for me.
Why isn't this in c# ?
What's the best way to do this?

Feb 16 '06 #2
yes, that helps a lot but in this case OnUnload() inserted:
base.OnUnload(e);

This is normal right (since it seems to be an override which is not the case
in VB) ?

Full:
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
}

I found out that there much more differences between these two than
anticipated.
For the ones needing a comparisation:
http://www.dnzone.com/ShowDetail.asp?NewsId=356

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> schreef in bericht news:O0****************@TK2MSFTNGP15.phx.gbl...
Ya...it's a nice feature of VB.NET. The best way to do it in C# is to hand
code it :)

intellisense will often kick in if you simply type in the word "override"
witin a class where you want ur method.

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

"Edwin Knoppert" <ne**@hellobasic.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
I'm doing some c# in VWD.
In VB-mode i can select a page event and VWD inserts the call for me.
Why isn't this in c# ?
What's the best way to do this?


Feb 16 '06 #3
That's right. You can "overrides" (extra s) in VB.Net as well, in which case
you need to call the base method using MyBase.OnUnload(e). Many people
prefer to override than the magic done by VB.NET because it's more
conventional and follows OO paradigms. You also have control over whether or
not the base method should be called, and when (normally you put it at the
end of the method, but sometimes you want it elsewhere).

Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Edwin Knoppert" <ne**@hellobasic.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
yes, that helps a lot but in this case OnUnload() inserted:
base.OnUnload(e);

This is normal right (since it seems to be an override which is not the
case in VB) ?

Full:
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
}

I found out that there much more differences between these two than
anticipated.
For the ones needing a comparisation:
http://www.dnzone.com/ShowDetail.asp?NewsId=356

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> schreef in bericht news:O0****************@TK2MSFTNGP15.phx.gbl...
Ya...it's a nice feature of VB.NET. The best way to do it in C# is to
hand code it :)

intellisense will often kick in if you simply type in the word "override"
witin a class where you want ur method.

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

"Edwin Knoppert" <ne**@hellobasic.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
I'm doing some c# in VWD.
In VB-mode i can select a page event and VWD inserts the call for me.
Why isn't this in c# ?
What's the best way to do this?



Feb 16 '06 #4

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

Similar topics

6
by: Tony G. | last post by:
Hi there, I have an APS 3 application, running on a Windows 2003 Web edition server - it is a very busy website, and when users are click on certain links (membership info), a new window i...
3
by: William | last post by:
Hi I have an ASP.NET application that connects to an Access database. Everything works fine except for the Session object. Data in the session object is lost after I've made a call to the...
9
by: AndersBj | last post by:
Hi all, I have a web application that uses State Server for session handling. The web application randomly loses all session variables. The sessions are not always lost, sometimes I can use the...
2
by: Supra | last post by:
An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll Additional information: Object reference not set to an instance of an object. i don't know how...
3
by: Tom | last post by:
I have a VB .NET application that has a text box with the following code to handle the leave event. Private Sub txtIDiscountRate_TextChanged(ByVal sender As System.Object, ByVal e As...
1
by: ucasesoftware | last post by:
i need to get a value comming from another Windows Application. How can i do that ? it's a phone number to open the customer form by phone number thx for help
0
by: Nick | last post by:
I have a situation wherein i have a text box, that has abc() being executed whenever the lost focus event is triggered. However, there is an exceptional case where, if a button click causes the...
7
by: Erik | last post by:
I have an application that uses sessions variables a lot but one I publish the application on the prod server these variables are lost. The application is written i c# 2.0 and I've set the...
2
by: maxkumar | last post by:
Hi, I am running a ASP.NET 1.1 site on Win Server 2003 with IIS 6.0. The website has been running for about 1.5 years now. In the past, we used to have random cases of session variables getting...
1
by: madhuxml82 | last post by:
Dear Forum Members, I have generated an XML Schema and a Table of XMLType referencing the XML Schema. Now When I am Inserting the Data into the Table. I am getting the Error 0RA-30937: Error is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
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...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
jinu1996
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...

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.