单击LinkButton时显示弹出错误我不知道如何解决此问题?
弹出
<%--popupBind function--%>
<link type="text/css" rel="Stylesheet" href="css/bootstrap.min.css" />
<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script>
function OpenPopUp() {
debugger;
$('#myModal').modal('show');
}
</script>
<%--end--%>
<%-- PopUp Code--%>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content" style="width: 55%;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Label ID="lblid" runat="server" CssClass="patient-detail"></asp:Label></h4>
<asp:Label ID="lblservicename" runat="server" CssClass="patient-detail" Style="color: green; font-size: 16px;">
Header
</asp:Label>
</div>
<div class="modal-body">
<asp:Button ID="btnProcess" runat="server" Text="Start" CssClass="btn btn-default" />
<asp:Button ID="btnpending" runat="server" Text="Waiting" CssClass="btn btn-default"/>
<asp:Button ID="btnclr" runat="server" Text="Completed" CssClass="btn btn-default" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<%--end--%>
按钮(单击“打开PoPuP的按钮”)
<asp:Button OnClick="Unnamed_Click" ID="popup" runat="server" />
服务器端的按钮事件
protected void Unnamed_Click(object sender, EventArgs e)
{
string dQuery = "";
string DCode = Convert.ToString(Session["DCode"]);
dQuery = @"SELECT * FROM TABLE";
DataTable dtButton = obj.GetDataTable(dQuery);
rptButtonMaster.DataSource = dtButton;
rptButtonMaster.DataBind();
// Page.ClientScript.RegisterStartupScript(this.GetType(), "myScript", "OpenPopUp();", true);
ScriptManager.RegisterStartupScript(this, Page.GetType(), "success", "<script> OpenPopUp(); </script>", false);
}
单击按钮(调用Javascript函数)
<script>
function OpenPopUp() {
debugger;
$('#myModal').modal('show');
}
</script>
在Load上获取所有时间相同的错误 错误:模型不是函数
我错过了什么?
答案 0 :(得分:0)
将您的电话打包成文件就绪声明
ScriptManager.RegisterStartupScript(this, Page.GetType(), "success", "<script>$(function(){OpenPopUp();})</script>", false);
确保脚本在bootstrap和jquery库之后注册/加载