0
我有网页形式,我添加图像(imagebutton)到表中,这是从数据库动态创建的运行时间...有一个静态图像,它会根据动态图像(S)鼠标悬停...添加图像按钮鼠标悬停事件
这里是代码:
HtmlTable tbProductImage = new HtmlTable();
HtmlTableRow trImageRow = new HtmlTableRow();
for (int j = 0; j < columnCount; j++) {
if (filteredFileList.Count != 0) {
HtmlTableCell tdImageRow = new HtmlTableCell();
Panel panel = new Panel();
ImageButton btnProduct = new ImageButton();
btnProduct.ID = "btn" + filteredFileList[j].Name.Substring(0, filteredFileList[j].Name.LastIndexOf("."));
btnProduct.ImageUrl = @"/ysyp/Images/Products/" + filteredFileList[j].Name;
btnProduct.Width = 50;
btnProduct.CommandName = "Click";
Page.ClientScript.GetPostBackEventReference(btnProduct, "btnProduct_Click");
btnProduct.CommandArgument = filteredFileList[j].Name;
btnProduct.Click += new ImageClickEventHandler(btnProduct_Click);
panel.Controls.Add(btnProduct);
trImageRow.Cells.Add(tdImageRow);
tdImageRow.Controls.Add(panel);
}
}
tbProductImage.Rows.Add(trImageRow);
tdProduct.Controls.Add(tbProductImage);
我怎么能做到这一点...
谢谢...
THX但不正是我需要首先我的图像动态即时通讯从文件夹中获取... – 2011-02-01 07:30:04