473,383 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

ITemplate and designer code generation

Hi, i've made my own Custom Server Control, wich inherits from WebControl class.

Inside of my control I've create three ITemplate properties wich should be used as containers for Head, Content and Footer.

Here is example of my Content property

Expand|Select|Wrap|Line Numbers
  1. 1        <Browsable(False), Description("The template property"), PersistenceMode(PersistenceMode.InnerProperty), TemplateContainer(GetType(ContentPanel))> _
  2. 2        Public Property Content() As ITemplate
  3. 3            Get
  4. 4                Return _content
  5. 5            End Get
  6. 6            Set(ByVal value As ITemplate)
  7. 7                _content = value
  8. 8            End Set
  9. 9        End Property
  10.  

ContentPanel is another control wich inherits from Panel control.

Now I've got fallowing asp.net code:



Expand|Select|Wrap|Line Numbers
  1. 1    <controls:MyControl id="MyControl1" runat="server">
  2. 2                <Content>
  3. 3                    <asp:Label ID="someLabel" runat="server" Text="dupa" />
  4. 4                </Content>
  5. 5    </controls:LayoutFrameControl>
The problem is, that someLabel is not added to .design.vb file after it's generated, why? Is there any solution? any attribute or sth? Please help me, because i've lost many hours to find the solution..
Dec 28 '08 #1
1 1493
Frinavale
9,735 Expert Mod 8TB
Are you adding the controls while debugging the application?

In this case, the control will be added to the page but since it's in debugging mode the designer.vb file cannot be updated.

-Frinny
Jan 13 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Martin Schulze | last post by:
Hello, i tried to compose myself a custom usercontrol which is derieved from System.Windows.Forms.UserControl. It contains 2 comboboxes and one textbox (which are also custom controls, but...
0
by: Steve Richter | last post by:
trying to understand how to support templates in server controls ... a few quick questions on the following snippet of code pulled from a server control class: ITemplate _headingStyle; ...
0
by: vicgroups | last post by:
Hello, I am adding columns to the datagrid programmatically. And I have created a countries drop down list in an ascx file. I have added the countries drop down list to the datagrid column as...
7
by: Dino Buljubasic | last post by:
I am having a problem when trying to view a form in desing view. If a form has any error or warning, the design view will not open the form. Anybody knows how to fix this error? Thank you...
5
by: Ben Schumacher | last post by:
Ok smart guys and gals ... I have a GridView control with a dynamically created checkbox column. The checkbox is created using ITemplate interface. In my class that implements the ITemplate...
0
by: imranabdulaziz | last post by:
Hi all, I am using asp.net2.0 and C# VS2005. I am creating asp.net web server control templates Dynamically . My requirement is such that sp return very no of field( 4 or 5 or 6 …). Now I am...
2
by: DC | last post by:
Hi, I am trying to implement a simple template control (to be used as TemplateItem etc. in GridView). Does someone see why my code fails? I give up for now and try a different approach (http://...
0
by: Andy B | last post by:
I added a LINQ classes (dbml) file to my web application project and drug a sql server database table from the server explorer onto the o/r designer. I saved and closed the designer after that. I...
6
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
Yesterday Visual Studio gave me a strange error both at compiletime and at designtime that had no obvious connection to anything I had changed recently. After some effort tracking down the problem...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.