Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > A question about user controls & alignment.

Reply
Thread Tools

A question about user controls & alignment.

 
 
Robert Koritnik
Guest
Posts: n/a
 
      07-08-2004
I have a rather complicated question that at first seems simple. Let's say
you develop user controls consisting of a label, textbox (or any other input
control) a "more" (the one with three dots - ellipsis) button and a set of
hidden input boxes. Label on the left proceeded by the textbox (or...) and
on the right a "more" button.

The problem:
If we look at the page it would consist of two columns of this kind of
controls. A form with many controls of this kind (three visible elements)
would display them in a table of 7 columns:
- label
- textbox (or...)
- more button
- separating column
- label
- textbox (or...)
- more button

Everything would be aligns. Labels, textboxes and more buttons. But if you
need to build many user controls like this, a containing table would have 3
columns:
- control
- separating column
- control

So the problem. How would you align these pieces of all user controls
between each other? Fixed widths are not acceptable, while everything can
get messy with different screen resolution setting in the system. All should
be done using HTML w/o CSS...

Any suggestion would be greatly appreciated.

--
RobertK
{ Clever? No just smart. }


 
Reply With Quote
 
 
 
 
Scott G.
Guest
Posts: n/a
 
      07-11-2004
I'm not exactly sure what you are asking for; I think you are saying you have a control with three columns, wrapped in an HTML <table> and you want a group of them, so you would have a series of <table>s, thus how would you make sure they align, since the individual tables would align their own columns.

If that's what you are asking, then I would change the control to generate just the <tr>stuff</tr> and then write a wrapper control that contains only these kinds of controls and it would generate the <table> ...child controls here.. </table>

The better answer might be to create a templated control that you could get better control of the what you are generating (i.e. just create all of the controls but some delegate the actual presentation to another wrapper control....)

If that's not what you are asking.... then ignore this .

Scott
"Robert Koritnik" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
I have a rather complicated question that at first seems simple. Let's say
you develop user controls consisting of a label, textbox (or any other input
control) a "more" (the one with three dots - ellipsis) button and a set of
hidden input boxes. Label on the left proceeded by the textbox (or...) and
on the right a "more" button.

The problem:
If we look at the page it would consist of two columns of this kind of
controls. A form with many controls of this kind (three visible elements)
would display them in a table of 7 columns:
- label
- textbox (or...)
- more button
- separating column
- label
- textbox (or...)
- more button

Everything would be aligns. Labels, textboxes and more buttons. But if you
need to build many user controls like this, a containing table would have 3
columns:
- control
- separating column
- control

So the problem. How would you align these pieces of all user controls
between each other? Fixed widths are not acceptable, while everything can
get messy with different screen resolution setting in the system. All should
be done using HTML w/o CSS...

Any suggestion would be greatly appreciated.

--
RobertK
{ Clever? No just smart. }


 
Reply With Quote
 
 
 
 
Robert Koritnik
Guest
Posts: n/a
 
      07-14-2004
You understood my question perfectly... I was asking exactly that. Yes. I
was thinking about TD solution so the control would only have the TD tags
and align them in the placeholder. But that's something I would really like
to avoid, because developer using those controls would have to have in mind
that HE must create the table, tr elements and put inside those controls.
Beside degner warnings/errors (maybe) because a table can contain only tr
(ok also tbody etc...) elements and tr can only contain td elements... So.
Making controls is beside reusability also a method to make usage of them to
the developer as much transparent as possible.

Once I did something simmilar with some control but it used javascript for
alignment. I made a result list control, that had fixed header and
scrollable results. And header had to align to results table. But I try to
avoid javascript as much as possible. Aspecially here.

Thans for your suggestions. But I was hoping of some totaly new approach
here. Ifyou have any other suggestions, you're more than welcome to present
more.

--
RobertK
{ Clever? No just smart. }


"Scott G." <(E-Mail Removed)> wrote in message
news:ux$(E-Mail Removed)...
I'm not exactly sure what you are asking for; I think you are saying you
have a control with three columns, wrapped in an HTML <table> and you want a
group of them, so you would have a series of <table>s, thus how would you
make sure they align, since the individual tables would align their own
columns.

If that's what you are asking, then I would change the control to generate
just the <tr>stuff</tr> and then write a wrapper control that contains only
these kinds of controls and it would generate the <table> ..child controls
here.. </table>

The better answer might be to create a templated control that you could get
better control of the what you are generating (i.e. just create all of the
controls but some delegate the actual presentation to another wrapper
control....)

If that's not what you are asking.... then ignore this .

Scott
"Robert Koritnik" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
I have a rather complicated question that at first seems simple. Let's say
you develop user controls consisting of a label, textbox (or any other
input
control) a "more" (the one with three dots - ellipsis) button and a set of
hidden input boxes. Label on the left proceeded by the textbox (or...) and
on the right a "more" button.

The problem:
If we look at the page it would consist of two columns of this kind of
controls. A form with many controls of this kind (three visible elements)
would display them in a table of 7 columns:
- label
- textbox (or...)
- more button
- separating column
- label
- textbox (or...)
- more button

Everything would be aligns. Labels, textboxes and more buttons. But if you
need to build many user controls like this, a containing table would have
3
columns:
- control
- separating column
- control

So the problem. How would you align these pieces of all user controls
between each other? Fixed widths are not acceptable, while everything can
get messy with different screen resolution setting in the system. All
should
be done using HTML w/o CSS...

Any suggestion would be greatly appreciated.

--
RobertK
{ Clever? No just smart. }



 
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
Controls.Count, Controls.IsSynchronized, and Controls.SyncRoot Nathan Sokalski ASP .Net 4 09-05-2007 03:27 AM
using javascript in User controls to access server controls of the user control Faizan Ahmed ASP .Net Building Controls 1 01-04-2005 04:09 PM
using javascript in User controls to access server controls of the user control Faizan Ahmed ASP .Net Web Controls 1 01-04-2005 04:09 PM
IntelliSense on Web User Controls and Web Custom Controls Axel Dahmen ASP .Net 1 11-12-2003 06:12 AM
HTML Controls and User controls trinitypete ASP .Net 6 06-26-2003 09:47 AM



Advertisments