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

Split InitializeComponent()

P: n/a
Anyone know how to split InitializeComponent() in vb.net 2003?

Regards
PCK
Feb 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,

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

Regards,
Jim

Feb 6 '06 #2

P: n/a
Dear Jim

What I mean is split the coding inside initilizaComponent.
"jim4u" <ji***@sify.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Hi,

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

Regards,
Jim

Feb 7 '06 #3

P: n/a
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

Feb 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.