Hello,
I am using a checkboxlist control. I am having trouble with arranging the
description of the checkboxes so that they line up left
centered and couple of spaces away from the checkboxes.
In the asp code, this is easy because the checkbox
and the description are on separate columns.
<td class="left">
<input name="task" type="checkbox" id="task">
</td>
<td class="left"> rsData("tasks")
</td>
So we get a checkbox and left centered description
that looks like this:
Teach courses pertaining to the chemical and
physical properties and compositional changes of
substances.
( the above description is left aligned, but may not show like that on the forum,)
( "physical" and "substances" fall right under "Teach ")
In the .net code, the checkboxlist control is in one
column, hence both the checkbox and the description
show up in the same column.
<td>
<asp:checkboxlist id="Checkboxlist2"
DataValueField="company_name" TextAlign="right"
DataTextField="company_name"
DataTextFormatString=" {0}"
Runat="server"></asp:checkboxlist>
</td>
and we end up with
Teach courses pertaining to the chemical and
physical properties and compositional changes of
substances.
which does not look good.
I suspect the solution might have something to do with
RenderBeginTag and RenderEndTag methods, but I am not
sure.
Do you know how I can create a custom checkboxlist control so that the text will appear
like the asp version?
Thank you,
Burak
I am using a checkboxlist control. I am having trouble with arranging the
description of the checkboxes so that they line up left
centered and couple of spaces away from the checkboxes.
In the asp code, this is easy because the checkbox
and the description are on separate columns.
<td class="left">
<input name="task" type="checkbox" id="task">
</td>
<td class="left"> rsData("tasks")
</td>
So we get a checkbox and left centered description
that looks like this:
Teach courses pertaining to the chemical and
physical properties and compositional changes of
substances.
( the above description is left aligned, but may not show like that on the forum,)
( "physical" and "substances" fall right under "Teach ")
In the .net code, the checkboxlist control is in one
column, hence both the checkbox and the description
show up in the same column.
<td>
<asp:checkboxlist id="Checkboxlist2"
DataValueField="company_name" TextAlign="right"
DataTextField="company_name"
DataTextFormatString=" {0}"
Runat="server"></asp:checkboxlist>
</td>
and we end up with
Teach courses pertaining to the chemical and
physical properties and compositional changes of
substances.
which does not look good.
I suspect the solution might have something to do with
RenderBeginTag and RenderEndTag methods, but I am not
sure.
Do you know how I can create a custom checkboxlist control so that the text will appear
like the asp version?
Thank you,
Burak