Tuesday, March 27, 2012

List in Asp.Net

Hello,
I need to create the following code in ASP.NET:
<ol>
<li>
<label for="name" class="required">Name:</label>
<input name="name" id="name" size="30" value="" type="text">
</li>
<li>
..
</li>
</ol>
Is this possible using ASP.NET server controls?
Thank you,
MiguelHello Shapper,
The html <li> control which wraps the <asp:label> and <asp:TextBox> ?!
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
S> <ol>
S> <li>
S> <label for="name" class="required">Name:</label>
S> <input name="name" id="name" size="30" value="" type="text">
S> </li>
S> <li>
S> ...
S> </li>
S> </ol>
On May 25, 10:08 pm, Michael Nemtsev <nemt...@.msn.com> wrote:
> Hello Shapper,
> The html <li> control which wraps the <asp:label> and <asp:TextBox> ?!
> --
> WBR, Michael Nemtsev [.NET/C# MVP].
> My blog:http://spaces.live.com/laflour
> Team blog:http://devkids.blogspot.com/
> "The greatest danger for most of us is not that our aim is too high and we
> miss it, but that it is too low and we reach it" (c) Michelangelo
> S> <ol>
> S> <li>
> S> <label for="name" class="required">Name:</label>
> S> <input name="name" id="name" size="30" value="" type="text">
> S> </li>
> S> <li>
> S> ...
> S> </li>
> S> </ol>
Yes, and the ol to.
Is there a control there creates such a list and then I add text box
and labels to list items?
Or must I use Literal to add the code to my page?
Or maybe I should use HtmlTextWriter? How should I use it?
Thanks,
Miguel
Hello Shapper,
there is only BulletedList and no NumericList, afaik.
Use repeater for this - just create a collection (ArrayList for example)
which will contain the desired elements and then databind the repeater to
the collection
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
S> On May 25, 10:08 pm, Michael Nemtsev <nemt...@.msn.com> wrote:
S>
S> Yes, and the ol to.
S> Is there a control there creates such a list and then I add text box
S> and labels to list items?
S> Or must I use Literal to add the code to my page?
S> Or maybe I should use HtmlTextWriter? How should I use it?
S> Thanks,
S> Miguel

0 comments:

Post a Comment