Hi ,
Try this will guide you .
<pre lang="xml"><div id="magazine" runat="server">
</div>
Code Behind :
protected void Page_Load(object sender, EventArgs e)
{
for (int i = 1; i < 5; i++)
{
HtmlGenericControl CreateDiv = new HtmlGenericControl();
HtmlImage imgt = new HtmlImage();
imgt.Src = "./images/"+ i+".jpg";
CreateDiv.Controls.Add(imgt);
magazine.Controls.Add(CreateDiv);
}
}
Best Regards
M.Mitwalli