Noble Lesmana
Guest
|
Posted:
Mon Jan 10, 2005 2:38 pm Post subject:
RE: web user control - loaded into a web part |
|
|
Hi,
Please make sure that the Page_Load event handler has been associated
properly with the Contol.Load event.
[C#] Are you using C# or other language? Below is one solution done with C#.
Check the InitializeComponent() method that is called during OnInit()
(inside "Web Form Designer generated code" region). Make sure that you have
the line as follows:
this.Load += new System.EventHandler(this.Page_Load);
Also, double check if you have added the user control to the Control
collection of your web part.
Controls.AddAt(0, myUserControl).
I hope this will help.
Thanks
Noble Lesmana
"jrmcdona" wrote:
| Quote: | I have a web user control hosted in a web application. The user control is
loaded into a web part.
Anything i do in the user controls's code behind page_load method does not
take effect. I dont get any errors, just nothign shows. However, if i drag
and drop a label and set the text in design time then everything is fine in
the web part.
Any ideas?
Thanks for your time!
Jordan
|
|
|