[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to call a panel and a web user control from teh server side?  I am using c#

Posted on 2008-11-05
1
Medium Priority
?
273 Views
Last Modified: 2013-11-07
Hi Experts!
I have a web user control called "WebUserControl.asxc" .Also I hace a page called"home.aspx".
I am trying to create  a "Panel" control from the  codebehind in"home.aspx" that can called "WebUserControl.asxc".

This is What I have so far...I create a panel and I give it an ID(Is this right?), now I need to call the webusercontrol and set it up inside the panel, how can I so this ? :
        Panel stepPanel = null;
        stepPanel.ID = "PanelInside";

Thanks!
0
Comment
Question by:eddyperu
1 Comment
 
LVL 4

Accepted Solution

by:
eddyperu earned 0 total points
ID: 22886171
This is the answer for aybody out there:
        Panel pnlECPopUp = new Panel();
        pnlECPopUp.ID = "pnlECPopUp";
        pnlECPopUp.CssClass = "modalPopup";
       // pnlECPopUp.Style.Value = "display: none";


        Control myControl = (Control)Page.LoadControl("controls/Exampletry.ascx");
        pnlECPopUp.Controls.Add(myControl);
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question