How to do add a label dynamically and style it?
<p>On adding the label and check box dynamically my images which were previously showing in single file horizontally on the webpage are now in vertical direction..how can I align the images in the horizontal direction and how can I show the image name + checkbox below each related image?</p>

<pre><code>while (reader.Read())
{
    attachmentId = Convert.ToInt32(reader["CustID"]);
    Image thumb = new Image();
    thumb.ImageUrl = string.Format("~/GenericHandler.ashx?AttachmentId={0}&amp;MaxWidth={1}" , attachmentId, _thumbWidth);
    thumb.CssClass = "thumbnail";

    // Add javascript to set main image to thumbnail when thumbnail is clicked
    thumb.Attributes.Add("onclick", "javascript:ChangePic('"
                                + ResolveUrl("~/GenericHandler.ashx")
                                + "?AttachmentId="
                                + attachmentId
                                + "&amp;MaxWidth="
                                + _mainImageWidth
                                + "');");

    Label myLabel = new Label();
    myLabel.Text = reader["ATT_Name"].ToString();

    CheckBox chkselect = new CheckBox();

    myLabel.Style["display"] = "block";
    chkselect.Style["display"] = "block";

    pnl_DvtThumbs.Controls.Add(thumb);
    pnl_DvtThumbs.Controls.Add(new LiteralControl("&lt;br/&gt;"));
    pnl_DvtThumbs.Controls.Add(myLabel);
    pnl_DvtThumbs.Controls.Add(chkselect);

    thumbList += "'" + attachmentId.ToString() + "',";

}
</code></pre>
