473,398 Members | 2,165 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,398 software developers and data experts.

Custom controls and innerHTML

Hi,
I would like to create a custom control to encapsulate my header, footer and
menu (a kind of frameset).
So, in my aspx page, I would like to write something like this:
<cc:Frameset>
<h1>something</h1>
<a ...>
<table>
...
</table>
</cc:Frameset>

I don't want to create a property because I'll need to write my HTML code
between double quotes.
A user control is not appropriated because I'll need to reuse this frameset
in several web applications.
What is the best thing to do ? Can I do what I want ?

Thanks.
Fred
Nov 18 '05 #1
1 2703
You could just derive your custom control from the PanelControl.

public class MyContainer : System.Web.UI.WebControls.Panel

Then Override the RenderChildren method:

protected override void RenderChildren(HtmlTextWriter writer)
{
writer.write("<table><tr><td>foo</td><tr><td>\n"); //header

base.RenderChildren(writer);

writer.write("</td></tr><tr><td>bar</td></tr></table>\n"); //footer
}

MattC
"Frédéric Mayot" <to**@toto.com> wrote in message
news:#A**************@TK2MSFTNGP09.phx.gbl...
Hi,
I would like to create a custom control to encapsulate my header, footer and menu (a kind of frameset).
So, in my aspx page, I would like to write something like this:
<cc:Frameset>
<h1>something</h1>
<a ...>
<table>
...
</table>
</cc:Frameset>

I don't want to create a property because I'll need to write my HTML code
between double quotes.
A user control is not appropriated because I'll need to reuse this frameset in several web applications.
What is the best thing to do ? Can I do what I want ?

Thanks.
Fred

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jesse Wade | last post by:
I'm trying to create a custom js object to display help text when you move the mouse over controls on a form. I've got two issues that are troubling: 1) The 'color' and 'backgroundColor'...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
1
by: Frank_00001 | last post by:
I'm trying to dynamically create controls on a <DIV>; however I want to add an <HR> in between certain controls, seems simple enough. I'm having trouble with the <HR>, I was going to just add it...
1
by: Marcus | last post by:
I have a problem maybe one of you could help me with. I've created a data entry screen with lots of dynamically-created client-side controls. I create HTML texboxes client-side by assigning a...
3
by: ThunderMusic | last post by:
Hi, I want to develop an ASP 2.0 Web control that would be just like an update panel (to use with a tab control), so when the user makes a request, the content of the page is loaded dynamicly...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
3
by: balurajeev | last post by:
Hii, currently i am working on an apliction(ASP.NET/C#) that creates dynamic html rows which contain six html text boxes and a html dropdowllist. At the time of page load the web page contain six...
0
by: Amit00 | last post by:
Hi, I'm performing an xsl transformation in a page I built, and would like to use some custom controls in it (or asp controls, for that matter). I looked this issue up, and understood that it...
4
by: omlac | last post by:
im creating controls using javascript, and i would like to retrieve the values of the controls in code behind(vb.net/c#) . My vb.net below is not returning them, Odata is a div but i added the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.