#region Web Form Designer generated code

J

JakeC

when i put my code in initializecomponent
it gets erased.

where is the best place to put my page oninit code
a)oninit
b)initializecomponent


when i put in
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
}

Thanks!!!
 
C

Cowboy \(Gregory A. Beamer\)

When I was working on a page with custom wiring (event wiring), I found that
you could place a call to a routine in InitializeComponent that would not
get erased. You would then set up the wiring in the other routine and
everything worked fine.

Hope this helps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top