hi
please anyone help me to set the height and width of the dynamically
created htmlimage button.
following is my code for displaying the image from folder.

  <asp:PlaceHolder ID="PlaceHolder1" runat="server"></
asp:PlaceHolder>

 if (!IsPostBack)
    {
        DirectoryInfo di = new DirectoryInfo(Server.MapPath("~/bio"));
        int i = 0;
        foreach (FileInfo fi in di.GetFiles())
        {
            HtmlInputImage ib = new HtmlInputImage();
            ib.ID = "ImageButton" + i;
            i++;
            ib.Src = "../vsjayanthi/bio/" + fi.Name;
            ib.Attributes.Add("onclick", "javascript:window.open('" +
"../vsjayanthi/bio/" + fi.Name + "');return false;");
            PlaceHolder1.Controls.Add(ib);
            Literal lit1 = new Literal();
            lit1.Text = "<br/>";
            PlaceHolder1.Controls.Add(lit1);

        }
    }

Reply via email to