web user control - loaded into a web part
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
web user control - loaded into a web part

 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development
Author Message
jrmcdona
Guest





Posted: Sat Jan 08, 2005 4:53 am    Post subject: web user control - loaded into a web part Reply with 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
Back to top
Noble Lesmana
Guest





Posted: Mon Jan 10, 2005 2:38 pm    Post subject: RE: web user control - loaded into a web part Reply with quote

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

Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB