Creating a control that other controls can be dropped in

How would one go about creating a control that other developers can drop their controls in, like how a Panel works?  Are there some links available?
0
jerchap
5/27/2004 9:27:24 PM
asp.net.hosting-open-forum 4216 articles. 0 followers. Follow

1 Replies
582 Views

Similar Articles

[PageSpeed] 58

With .net 1.x there's 2 basic mechanisms.

1) Do what Panel does, and use the ReadWriteControlDesigner. This causes your control to support drag-drop exactly like panel, but also like panel, does not let you show any html around the area. Your control will always only look like a panel.
2) Templates. Make the area that will be editable be an ITemplate property. You can use this templated control designer I wrote to quickly set up the designer experience. Using templates has the downside of the child controls not being made page-level properties by ID, so you have to use FindControl to reference them even though there is only one instance.

Overall, Templates is generally your best choice, and with some new stuff coming in whidbey, it gives you a good upgrade path.
0
Andy
5/27/2004 9:45:53 PM
Reply:

Similar Artilces:

simple way to create a custom control (like Panel) that you can drag and drop other controls into at design time
Hi , I need to create one custom control like panel, for containing some other controls into at design time. I tried with panel custom control but I am not able to add other server controls to that custom panel control at design time. Could anyone please help me out.  Thanks Raghu Hi, You need to override CreateChildControls function. Inside the function something like this: TextBox T = new TextBox(); this.Controls.add(T); Bye.Wamba {WamBlog}Dont forget to click "Mark as Answer" on the post that helped you.This credits the member,earns you a point & marks your t...

User Control controls not created when dynamically creating user control
  Have created a user control for displaying and editing a dynamically number of values. The user control contains two labels and an edit box. When dynamically loading the user control I get an error when the control itself tries to change setting on the fields within the user control.   Why doesnt this work? It works okay if I dont load it dynamically but create a user-control-instance in the aspx-page but thats no solution.   Thankyou!     Here is my code:   ucDataValue.ascx   <%@ Control Language="C#" AutoEventWireup="true&...

Can we use existing Server Controls to create Custom Controls?
Can we use the existing ASP.Net Server Controls to create Custom Controls? I am able to use HtmlTextWriter to make my Custom Controls. I want to be able to add regular ASP.Net server controls to create my Custom Controls. Is this possible? Can anyone provide a sample? Basically, you just need to inherit the control you want to use, like this: Public Class MyControl Inherits System.Web.UI.WebControls.TextBox Then you can override the methods you want and add code as needed. Peter BrunoneMS MVP, ASP.NETFounder, EasyListBox.comDo the impossible, and go home early. The str...

Ajax Control Toolkit: Control cannot be created because Visual Studio cannot find the control's type in the control assembly.
Hi All, Good Day.  I am using ASP.Net 2.0 Framework, i have downloaded Ajax 3.0 and added reference into the project. But i am not able to add controls to the page. When i tried to add control into the page getting following error message "Control cannot be created because Visual Studio cannot find the control's type in the control assembly". I checked some forums on the web, added references in Web.Config. Still not able to proceed further. Please revert asap.  Thanks. AJAX 3.0 not work in 2.0 Framework its work in 3.5 Framework try to download another ...

can panel control be used to create tab like effect/control?
is there a way to create a tab like control using multiple panel controls? Take a look at the AJAX control tool kit tab controlhttp://www.asp.net/AJAX/AjaxControlToolkit/Samples/Tabs/Tabs.aspx Jeev~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~If you get the answer to your question, please mark it as the answer....

Server control not created child controls when hosted inside update panel
 Hi,  I am having a problem with the initialisation of a custom server control when it has controls inside an update panel, when its public properties are modified in the markup on the containing page. In the code below, you can see that: The server control contains a label, and exposes a public property, "Text", which simply wraps the text property of the label that it contains. The page contains a server control, and modifies the server control's "Text" property through the html markup. An "object is null" error occurs at line 7. The error can be fixed if eithe...

How can I create a OLE control by writing script instead of selecting on control panel?
I want to create a OLE control which names "test.testControl",How to? I wrote like this: OLEControl ole_1 ole_1 = Create OLEControl ole_1.InsertClass("test.testControl") but it failed. Drop an empty OLE control on your window. I did this by selecting OLE from the toolbar, clicking cancel on the dialog then clicking on my window thus adding the OLE container to the window. Click cancel again if the OLE dialog pops up. Next, in a command button I added: ole_1.InsertClass("excel.sheet") When I click the command button, the OLE object of E...

Multipage
how can I drag controls (eg table) directly onto a Multipage control. I'd rather not have to write all the HTML if I can possible avoid it.Caro You may drag the table control and put it inside a "<PAGEVIEW>" tag.This posting is provided "AS IS" with no warranties, and confers no rights. Caro, It's true that you cannot drag & drop ctrls directly in multipage. But you can, somewhere in the page, and paste your code after like this: <YourTagPrefix:PageView> <table> <tr> <td></td> <td></td> <td>...

control cannot be created because visual studio find the controls type in the control assembly
Hi to all,            I'm working with Asp.Net2.0,VS2005-C# and Crystal Report 11.5.            Whenever i drag and drop the CrystalReportViewer control from Toolbox then i got this error control cannot be created because visual studio find the controls type in the control assembly then i click OK button then it display one more error Invalid Forematetc structure (Exception from HRESULT: 0x80040064(DV_E_FORMATETC) But all other projects i can add the control from toolbox&nb...

control cannot be created because Visual Studio Cannot find the Controls type in the Control Assembly
Hi Friends, I have installed Visual Studion 2005 on my machine. After creating an AJAX FutureRelese Web project. I tried to add Future Release Controls to my web page. I am getting the following error "control cannot be created because Visual Studio Cannot find the Controls type in the Control Assembly" Could you please get back to me with the solution for this. Thanks and Regards, Baburaj P V Pls make sure you have System.Web.Extensions referenced. If Not Add it from the Reference Dialog, it is insalled in the GAC. If you also have the previous version then you have to modify th...

Can I have a control that controls more than on link?
The question is, i have a page that have 3 sections that are controled by 3 controls.This controls just post to a page and then retrieve the html of the page and then post it back to the Community. This 3 contrlols have the same code except the link. of the page I want to retrieve . Is there a more simple way to not having 3 controls that due exactly the same? Thanks  ...

Is there a existing control or extender that can let radiobuttlist controls panels (or list of controls)?
Quite often, I need display a subset of controls on a form according to what user pick in a radiobuttonlist, for example, a radionbuttonlist with the following options 1, no 2, yes, email to me3, yes, mail to me when user pick 2, I need show please fill in your email : .... when user pick 3, I need showname :address :....... I can do this on server side, but it will cause page reload. Now I want to do it with Ajax, I want to know if someone has done some work on this, or there is something in Toolkit can do this thanks for help. These videos will get you going quickly: http://www.asp...

Creating a User Control validator that validates a control on the page, rather than inside the control.
I'm trying to create a custom user control that is nothing more than a RangeValidator that validates other controls that lie on the page rather than inside the control itself... is this possible, is there a way to "bubble" it up. Thanks, G My answer to your other question regarding the CompareValidator applies here. If the custom control is in the same naming container AND does not implement INamingContainer, you can create a property that lets the user assign the control to validate. Internally assign the Validator.ControlToValidate property to the value of that property.-...

create and add controls dynamically to dynamically created Table Control
How can i create web server Table control dynamically with vary number of  rows and columns, and  then adding  further  other controls(like  dropdown, Text box etc.)  randomly to the specific created Table Cells. First of all you should use PlaceHolder control to add Table control to it:<asp:PlaceHolder id="PH" runat="server"></asp:PlaceHolder>Code Behinde:Table t = new Table();TableRow tr = new TableRow();TableCell td = new TableCell();//td.Text = "Hello, I am a TD";// Here well create TextBox and add it to TDTextBox txt = new TextBox();tx...

Web resources about - Creating a control that other controls can be dropped in - asp.net.hosting-open-forum

Wikipedia:Creating a bot - Wikipedia, the free encyclopedia
It is often far simpler to request a bot job from an existing bot. If you have only periodic requests or are uncomfortable with programming languages, ...

U.K. Woman Faces 20 Months For Creating Fake Facebook Accounts, Sending Herself Abusive Messages
A woman in Cornwall in the U.K. came up with a creative way to use Facebook to accelerate a family spat, and it earned her 20 months in prison. ...

Sandi Krakowski’s Tips for Creating Great Content
Quick tips to help you create great content for your business.

Bug - Creating a Video.Watches Action stopped working - Facebook-Entwickler
Since today executing a POST on a me/video.wacthes endpoints no longer works, it was working around 10 hours ago since then the call always returns ...

Facebook simplifies process for creating repeat events
Facebook introduced a new feature for events this week that allows users to quickly create a similar event as one they previously hosted or attended. ...

The Obama campaign won by creating their own Facebook, with unique features for political campaigns.
... seen as too dangerous to nominate someone who is so thoroughly narcissistic, arrogant and dishonest. The Obama campaign won basically by creating ...

Creating A Road Map To Market Your Startup
Spreading the word can be challenging when you’re new to an industry, don’t have a big budget, and have little helpbut it’s possible.You’ll need ...

Dance Machine - The Fun Video Editor for Creating Music Videos to share on Instagram, Facebook, Vine ...
Get Dance Machine - The Fun Video Editor for Creating Music Videos to share on Instagram, Facebook, Vine, and Twitter on the App Store. See screenshots ...

Creating Economic Dynamism: Joseph E. Stiglitz
DAVOS/SWITZERLAND, 25JAN13 - Joseph E. Stiglitz, Professor, Columbia University, USA talks during the session 'Creating Economic Dynamism' at ...

YouTube - Super Human Abilities: Tila Tequila Creating Energy Balls & Electricity Out of Thin Air!
Veröffentlicht am 24.04.2013 Hey Guys! For a long time now I have been able to do some pretty supernatural things that most would consider "SUPER ...

Resources last updated: 12/28/2015 2:18:04 AM