473,466 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Why all the System.Web.UI.WebContorls?

I have an asp.net project containing several dozen webforms. For some reason
on one of these webforms in the Public Class area there is listed each
webform control as follows...

Public Class Logs_Detail
Inherits System.Web.UI.Page
Public strTitle As String
Dim IsItCustProp As String
Public IsItHistorical As String
-> Protected WithEvents btnBack As System.Web.UI.WebControls.Button
-> Protected WithEvents btnBundleValue As System.Web.UI.WebControls.Button
-> Protected WithEvents btnDesignate As System.Web.UI.WebControls.Button
-> Protected WithEvents btnUpdateStatus As System.Web.UI.WebControls.Button
-> Protected WithEvents ddlStatus As System.Web.UI.WebControls.DropDownList
-> Protected WithEvents Label17 As System.Web.UI.WebControls.Label
-> Protected WithEvents btnLocation As System.Web.UI.WebControls.Button

Why does this one form have all of these controls defined as such? Thanks.
Nov 18 '05 #1
3 1096
The form editor creates those declarations when you edit a form from it.

Every ASP.NET page built in VS.NET has this. The "WithEvents" just
means that the object exposes events that you can hook a handler to.

If those items aren't on your form, it might be caused by creating
events for those items, or working with them somewhere, then deleting
them with the designer.

That looks pretty normal to me.
MrMike wrote:
I have an asp.net project containing several dozen webforms. For some reason
on one of these webforms in the Public Class area there is listed each
webform control as follows...

Public Class Logs_Detail
Inherits System.Web.UI.Page
Public strTitle As String
Dim IsItCustProp As String
Public IsItHistorical As String
-> Protected WithEvents btnBack As System.Web.UI.WebControls.Button
-> Protected WithEvents btnBundleValue As System.Web.UI.WebControls.Button
-> Protected WithEvents btnDesignate As System.Web.UI.WebControls.Button
-> Protected WithEvents btnUpdateStatus As System.Web.UI.WebControls.Button
-> Protected WithEvents ddlStatus As System.Web.UI.WebControls.DropDownList
-> Protected WithEvents Label17 As System.Web.UI.WebControls.Label
-> Protected WithEvents btnLocation As System.Web.UI.WebControls.Button

Why does this one form have all of these controls defined as such? Thanks.

Nov 18 '05 #2
Ok Thanks Mike. I've looked at the other forms and I see that these same
declarations exist within the other forms, only within a #Region which I had
not noticed previously. Thanks for your help.

"Mike Newton" wrote:
The form editor creates those declarations when you edit a form from it.

Every ASP.NET page built in VS.NET has this. The "WithEvents" just
means that the object exposes events that you can hook a handler to.

If those items aren't on your form, it might be caused by creating
events for those items, or working with them somewhere, then deleting
them with the designer.

That looks pretty normal to me.
MrMike wrote:
I have an asp.net project containing several dozen webforms. For some reason
on one of these webforms in the Public Class area there is listed each
webform control as follows...

Public Class Logs_Detail
Inherits System.Web.UI.Page
Public strTitle As String
Dim IsItCustProp As String
Public IsItHistorical As String
-> Protected WithEvents btnBack As System.Web.UI.WebControls.Button
-> Protected WithEvents btnBundleValue As System.Web.UI.WebControls.Button
-> Protected WithEvents btnDesignate As System.Web.UI.WebControls.Button
-> Protected WithEvents btnUpdateStatus As System.Web.UI.WebControls.Button
-> Protected WithEvents ddlStatus As System.Web.UI.WebControls.DropDownList
-> Protected WithEvents Label17 As System.Web.UI.WebControls.Label
-> Protected WithEvents btnLocation As System.Web.UI.WebControls.Button

Why does this one form have all of these controls defined as such? Thanks.

Nov 18 '05 #3
I don't know if it is pertinent to say so but I just discovered the VB IDE
writes the namespace "Inherits" declarations to the .proj file instead of
into the source code where common sense suggests such declarations should be
located.

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"MrMike" <Mr****@discussions.microsoft.com> wrote in message
news:26**********************************@microsof t.com...
Ok Thanks Mike. I've looked at the other forms and I see that these same
declarations exist within the other forms, only within a #Region which I had not noticed previously. Thanks for your help.

"Mike Newton" wrote:
The form editor creates those declarations when you edit a form from it.

Every ASP.NET page built in VS.NET has this. The "WithEvents" just
means that the object exposes events that you can hook a handler to.

If those items aren't on your form, it might be caused by creating
events for those items, or working with them somewhere, then deleting
them with the designer.

That looks pretty normal to me.
MrMike wrote:
I have an asp.net project containing several dozen webforms. For some reason on one of these webforms in the Public Class area there is listed each
webform control as follows...

Public Class Logs_Detail
Inherits System.Web.UI.Page
Public strTitle As String
Dim IsItCustProp As String
Public IsItHistorical As String
-> Protected WithEvents btnBack As System.Web.UI.WebControls.Button
-> Protected WithEvents btnBundleValue As System.Web.UI.WebControls.Button -> Protected WithEvents btnDesignate As System.Web.UI.WebControls.Button -> Protected WithEvents btnUpdateStatus As System.Web.UI.WebControls.Button -> Protected WithEvents ddlStatus As System.Web.UI.WebControls.DropDownList -> Protected WithEvents Label17 As System.Web.UI.WebControls.Label
-> Protected WithEvents btnLocation As System.Web.UI.WebControls.Button
Why does this one form have all of these controls defined as such?
Thanks.

Nov 18 '05 #4

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

Similar topics

3
by: Terrence | last post by:
I am doing some of the C# walkthroughs to transition from VB to C#. When I try to execute static void Main() { Aplication.Run(new Form1()) } I raise a 'System.NullReferenceException" in...
2
by: Scott | last post by:
Not sure if this is the right place to post this or not, but I am in the process of trying to find a Web Hosting/Isp Billing system that is reasonable in price and uses Access or SQL Server for a...
5
by: laks | last post by:
Hi I have the following xsl stmt. <xsl:for-each select="JOB_POSTINGS/JOB_POSTING \"> <xsl:sort select="JOB_TITLE" order="ascending"/> This works fine when I use it. But when using multiple...
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
1
by: Sky | last post by:
Yesterday I was told that GetType(string) should not just be with a Type, but be Type, AssemblyName. Fair enough, get the reason. (Finally!). As long as it doesn't cause tech support problems...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
2
by: =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post by:
Hi, I am wondering why the .NET Framework is quite different from Win32 API when it comes to displaying system modal message boxes. Consider the four following types of system modal message...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.