我创建了动态生成的链接按钮。单击这些按钮时,我想创建一个弹出窗口。这怎么可能。
foreach (string fileName in allFiles)
{
// now create the LinkButtons ...
Panel1.Controls.Add(new LiteralControl("<div>"));
LinkButton lb = new LinkButton();
lb.Text = fileName;
lb.ID = fileName;
Session["fn"] = fileName;
Panel1.Controls.Add(lb);
Panel1.Controls.Add(new LiteralControl("</div>"));
lb.PostBackUrl = ScriptManager.RegisterStartupScript(Page, typeof(Page), "New", "window.open('pdf_files.aspx');", true);
}
它显示错误“无法将字符串转换为 void”