#region Web Form Designer generated code

  • Thread starter Thread starter JakeC
  • Start date Start date
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!!!
 
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!
**********************************************************************
 
Back
Top