本人刚学习.net,基础不扎实,望大神多多指教。
错误信息提示:
CS1061: 'ASP.controls_contentassignmentcontrol_ascx' does not contain a definition for 'btnPrintCA_Click' and no extension method 'btnPrintCA_Click' accepting a first argument of type 'ASP.controls_contentassignmentcontrol_ascx' could be found (are you missing a using directive or an assembly reference?)
前端代码:
<asp:ImageButton ID="imgBtnPrintCA" OnClick="btnPrintCA_Click" runat="server" ImageUrl="~/Content/Image/print_32.gif" meta:resourcekey="imgBtnPrint"/>
后台代码:
public void btnPrintCA_Click(object sender, ImageClickEventArgs e) { try { ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "_Page", "showPVDialog('ContentAssignmentPrint.aspx','')", true); } catch { }
将OnClick="btnPrintCA_Click"删掉重新生成一下OnClick事件处理试试
不建议用服务器控件。
asp.net?看名字是打印???