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