Split InitializeComponent()

  • Thread starter Thread starter Phoon Chee Keong
  • Start date Start date
P

Phoon Chee Keong

Anyone know how to split InitializeComponent() in vb.net 2003?

Regards
PCK
 
Hi,

Can you please specify what is your exact requirement? By 'split', what
do you mean?

Regards,
Jim
 
Dear Jim

What I mean is split the coding inside initilizaComponent.
 
Phoon,

I do assume you mean the InitializeComponent method generated by VS.Net
in Asp.Net and Windows forms.

Basically, in ASP.Net, only event handlers are added in
InitializeComponent
e.g.: this.grdProjects.ItemDataBound += new
System.Web.UI.WebControls.DataGridItemEventHandler(this.grdProjects_ItemDataBound);

In Windows forms, controls are initialized, properties set, and event
handlers are added in InitializeComponent.
e.g.:
this.cancelButton = new System.Windows.Forms.Button();
this.cancelButton.Text = "Cancel";
this.cancelButton.Click += new
System.EventHandler(this.CancelButton_Click);

Do you want to split code in InitializeComponent in Asp.Net or Windows
forms? How do you want to split coding? Do you want to split it into
two like
#1. Control initialization and property setting.
#2. Adding event handlers. ?

or into three like
#1. Control initialization
#2. Property setting
#3. Event handlers ?

Regards,
Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top