473,416 Members | 1,737 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,416 software developers and data experts.

Nested controls in custom tab control

Hello!

I am about to make a class/control that creates tabbing functionality. The
result is in HTML/CSS/JavaScript output.

My question is: Within the tabs I want to simply add user controls and
without loosing viewstate etc etc. How can this be done? What is best
practice?

I guess the answer for my question lies in how I design/develop the tab
class/control. One solutions might simply to have a placeholder created for
each tab (and then the usercontrol to be in that tab added to the
placeholder).

Any comments/suggestions appreciated.

Marius
Nov 19 '05 #1
4 4174
Hi,

My suggestion is the next.
I think a tabbed control is "just" a serie of labels displayed in a peculiar
way.
That is to say, a tabbed control can be composed of

<ul><li>tab1</li><li>tab2</li><li>tab3</li></ul> (this example was the
choice of Scott Watermasysk http://www.scottwater.com)

After that, you must specify styles for each tag (this is the hard work) and
create a style for selected tab if you want to handle a persistable
seletected tab or when the mouse pointer hovers it.

I suggest you to take a look at scott site because i think it's a very good
example of how to use css.

Hope this helps!
Regards,
Franck Quintana
Active+ Software
http://www.activeplus.com
"Marius Trælnes" <ma*******************@nospamc2i.net> wrote in message
news:ei**************@tk2msftngp13.phx.gbl...
| Hello!
|
| I am about to make a class/control that creates tabbing functionality. The
| result is in HTML/CSS/JavaScript output.
|
| My question is: Within the tabs I want to simply add user controls and
| without loosing viewstate etc etc. How can this be done? What is best
| practice?
|
| I guess the answer for my question lies in how I design/develop the tab
| class/control. One solutions might simply to have a placeholder created
for
| each tab (and then the usercontrol to be in that tab added to the
| placeholder).
|
| Any comments/suggestions appreciated.
|
| Marius
|
|

Nov 19 '05 #2
Hello Franck,

This was not an answer to my question. How to make the tab control i know. I
asked about how to add existing user controls into the custom tab control.
Forget the tab control if that is confusing. How to add existing user
controls into some dynamic generated html then. What is the best approach?

Thanks for trying though...

Marius

"Franck Quintana" <la*****@wanadoo.fr> wrote in message
news:41**********************@read.news.fr.uu.net. ..
Hi,

My suggestion is the next.
I think a tabbed control is "just" a serie of labels displayed in a peculiar way.
That is to say, a tabbed control can be composed of

<ul><li>tab1</li><li>tab2</li><li>tab3</li></ul> (this example was the
choice of Scott Watermasysk http://www.scottwater.com)

After that, you must specify styles for each tag (this is the hard work) and create a style for selected tab if you want to handle a persistable
seletected tab or when the mouse pointer hovers it.

I suggest you to take a look at scott site because i think it's a very good example of how to use css.

Hope this helps!
Regards,
Franck Quintana
Active+ Software
http://www.activeplus.com
"Marius Trælnes" <ma*******************@nospamc2i.net> wrote in message
news:ei**************@tk2msftngp13.phx.gbl...
| Hello!
|
| I am about to make a class/control that creates tabbing functionality. The | result is in HTML/CSS/JavaScript output.
|
| My question is: Within the tabs I want to simply add user controls and
| without loosing viewstate etc etc. How can this be done? What is best
| practice?
|
| I guess the answer for my question lies in how I design/develop the tab
| class/control. One solutions might simply to have a placeholder created
for
| each tab (and then the usercontrol to be in that tab added to the
| placeholder).
|
| Any comments/suggestions appreciated.
|
| Marius
|
|

Nov 19 '05 #3
just add them to your Controls collection (and render your children). you do
no need a placeholder, because your tab control can be placed on the form.

-- bruce (sqlwork.com)
"Marius Trælnes" <ma*******************@nospamc2i.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
| Hello Franck,
|
| This was not an answer to my question. How to make the tab control i know.
I
| asked about how to add existing user controls into the custom tab control.
| Forget the tab control if that is confusing. How to add existing user
| controls into some dynamic generated html then. What is the best approach?
|
| Thanks for trying though...
|
| Marius
|
| "Franck Quintana" <la*****@wanadoo.fr> wrote in message
| news:41**********************@read.news.fr.uu.net. ..
| > Hi,
| >
| > My suggestion is the next.
| > I think a tabbed control is "just" a serie of labels displayed in a
| peculiar
| > way.
| > That is to say, a tabbed control can be composed of
| >
| > <ul><li>tab1</li><li>tab2</li><li>tab3</li></ul> (this example was the
| > choice of Scott Watermasysk http://www.scottwater.com)
| >
| > After that, you must specify styles for each tag (this is the hard work)
| and
| > create a style for selected tab if you want to handle a persistable
| > seletected tab or when the mouse pointer hovers it.
| >
| > I suggest you to take a look at scott site because i think it's a very
| good
| > example of how to use css.
| >
| > Hope this helps!
| > Regards,
| > Franck Quintana
| > Active+ Software
| > http://www.activeplus.com
| >
| >
| > "Marius Trælnes" <ma*******************@nospamc2i.net> wrote in message
| > news:ei**************@tk2msftngp13.phx.gbl...
| > | Hello!
| > |
| > | I am about to make a class/control that creates tabbing functionality.
| The
| > | result is in HTML/CSS/JavaScript output.
| > |
| > | My question is: Within the tabs I want to simply add user controls and
| > | without loosing viewstate etc etc. How can this be done? What is best
| > | practice?
| > |
| > | I guess the answer for my question lies in how I design/develop the
tab
| > | class/control. One solutions might simply to have a placeholder
created
| > for
| > | each tab (and then the usercontrol to be in that tab added to the
| > | placeholder).
| > |
| > | Any comments/suggestions appreciated.
| > |
| > | Marius
| > |
| > |
| >
|
|
Nov 19 '05 #4
Ok, thank you for your tip. I still cannot see how this can be done without
placdholder (problably since I have only used that before).

Here is description of how I think this could be solved and my doubts:

1. A tab user control is made. There is some codebehind code there to create
correct client code (html/css/javascript). On each tab in that control there
should be possible to add other user controls (based on some properties to
be set when creating the user control).
2. This tab user control is placed on a web form (id = tabctrl1) and
"tab1Control" property is set to "testctrl.ascx".
3. At runtime the tab user controls then add the control "testctrl.ascx" in
the area of tab1. Here is doubt, and here are the approach I can think of:
Using control collection I can add the control as follows:
tabctrl1.Controls.Add(LoadControl("testctrl.ascx") ). But here are 1 problem:
How to place this correct in the tab controls html output (here is a lot of
html/css/javascript created dynamically...). Here I only see that this can
be done by placing a placeholder where tab1 area is (or a panel control
could also to the work...)

Please let me know if I am missing something.

(of course, if I knew upfront what controls should be in each tab none of
this would be a problem, it is that it should be dynamically loaded that is
the "problem")

Marius
"bruce barker" <no***********@safeco.com> skrev i melding
news:u6**************@TK2MSFTNGP09.phx.gbl...
just add them to your Controls collection (and render your children). you
do
no need a placeholder, because your tab control can be placed on the form.

-- bruce (sqlwork.com)
"Marius Trælnes" <ma*******************@nospamc2i.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
| Hello Franck,
|
| This was not an answer to my question. How to make the tab control i
know.
I
| asked about how to add existing user controls into the custom tab
control.
| Forget the tab control if that is confusing. How to add existing user
| controls into some dynamic generated html then. What is the best
approach?
|
| Thanks for trying though...
|
| Marius
|
| "Franck Quintana" <la*****@wanadoo.fr> wrote in message
| news:41**********************@read.news.fr.uu.net. ..
| > Hi,
| >
| > My suggestion is the next.
| > I think a tabbed control is "just" a serie of labels displayed in a
| peculiar
| > way.
| > That is to say, a tabbed control can be composed of
| >
| > <ul><li>tab1</li><li>tab2</li><li>tab3</li></ul> (this example was the
| > choice of Scott Watermasysk http://www.scottwater.com)
| >
| > After that, you must specify styles for each tag (this is the hard
work)
| and
| > create a style for selected tab if you want to handle a persistable
| > seletected tab or when the mouse pointer hovers it.
| >
| > I suggest you to take a look at scott site because i think it's a very
| good
| > example of how to use css.
| >
| > Hope this helps!
| > Regards,
| > Franck Quintana
| > Active+ Software
| > http://www.activeplus.com
| >
| >
| > "Marius Trælnes" <ma*******************@nospamc2i.net> wrote in
message
| > news:ei**************@tk2msftngp13.phx.gbl...
| > | Hello!
| > |
| > | I am about to make a class/control that creates tabbing
functionality.
| The
| > | result is in HTML/CSS/JavaScript output.
| > |
| > | My question is: Within the tabs I want to simply add user controls
and
| > | without loosing viewstate etc etc. How can this be done? What is
best
| > | practice?
| > |
| > | I guess the answer for my question lies in how I design/develop the
tab
| > | class/control. One solutions might simply to have a placeholder
created
| > for
| > | each tab (and then the usercontrol to be in that tab added to the
| > | placeholder).
| > |
| > | Any comments/suggestions appreciated.
| > |
| > | Marius
| > |
| > |
| >
|
|

Nov 19 '05 #5

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

Similar topics

0
by: Yasir Hussain | last post by:
Hope someone can shed some light on the follow issue. With regards to the excellent article by Dino Esposito on Nested DataGrids,...
16
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
5
by: ~~~ .NET Ed ~~~ | last post by:
Hi, As you all know when an ASP.NET web form is created that will include web controls and such, it contains a FORM that that identifies the web form and its containing controls. Well, I have a...
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
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...
2
by: brad | last post by:
Group, I'm using Visual Studio 2003 to create an ASP.NET 1.1 project which contains nested server user controls in order to create a tree-like hierarchy. The tree is a sort of question and...
12
by: Bob Jones | last post by:
I have an odd business requirement and I think that the implementation is not correct in the terms of OOP development. Any help on the concepts would be very appreciated! We currently have a...
1
by: Peter Rilling | last post by:
Hi. I would like to create some controls that allow control elements. For instance, <foo:MyControl ...> <foo:SomeNestedControl .../> </foo:MyControl> The questions are,
5
by: John Kotuby | last post by:
Hi all, After more than a year programming with ASP.NET 2.0 and VB I am still finding it difficult to leave some habits from classic ASP behind. this is particularly true with cross-page posting....
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
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
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
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.