Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Nested controls in custom tab control

Reply
Thread Tools

Nested controls in custom tab control

 
 
Marius Trælnes
Guest
Posts: n/a
 
      01-03-2005
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


 
Reply With Quote
 
 
 
 
Franck Quintana
Guest
Posts: n/a
 
      01-03-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| 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
|
|

 
Reply With Quote
 
 
 
 
Marius Trælnes
Guest
Posts: n/a
 
      01-03-2005
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" <(E-Mail Removed)> wrote in message
news:41d9561a$0$3515$(E-Mail Removed). ..
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> | 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
> |
> |
>



 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      01-03-2005
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
| 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" <(E-Mail Removed)> wrote in message
| news:41d9561a$0$3515$(E-Mail Removed). ..
| > 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" <(E-Mail Removed)> wrote in message
| > news:(E-Mail Removed)...
| > | 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
| > |
| > |
| >
|
|


 
Reply With Quote
 
Henrik Larsen
Guest
Posts: n/a
 
      01-03-2005
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" <(E-Mail Removed)> skrev i melding
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> | 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" <(E-Mail Removed)> wrote in message
> | news:41d9561a$0$3515$(E-Mail Removed). ..
> | > 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" <(E-Mail Removed)> wrote in
> message
> | > news:(E-Mail Removed)...
> | > | 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
> | > |
> | > |
> | >
> |
> |
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Control, ITemplate and nested bound controls Brook ASP .Net Web Controls 4 03-25-2008 02:55 PM
databound custom controls vs composite databound custom controls rodchar ASP .Net 0 11-26-2007 03:51 PM
nested controls in a custom control. Peter Rilling ASP .Net 1 03-26-2007 05:59 PM
Custom Server Control raising events for nested controls Dakota2030 ASP .Net 0 03-11-2005 10:26 PM
Re: URgent!!!!!!!!!!!! change tab selection Tab strip control Hermit Dave ASP .Net 0 01-22-2004 11:02 PM



Advertisments