Microsoft JScript 运行时错误:需要对象
当以下条件匹配时,我收到此错误,我在内容页面中使用以下代码,并且在我的母版页中我有此
<asp:ScriptManager EnablePartialRendering="true" EnablePageMethods="true" ID="smgr" runat="server" />
错误:Microsoft JScript 运行时错误:预期对象
if (lstRecipient.Items[i].Text == ddlRecipient.SelectedItem.Text)
{
lstRecipient.Items.RemoveAt(i);
isDuplicate = true;
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AlertAdd", "jAlert('Recipient name is already in the list.', 'Duplicate Entry!');", true);
}
i am getting this error when the below condition match, i am using the below code in Content page and in my master page i have this
<asp:ScriptManager EnablePartialRendering="true" EnablePageMethods="true" ID="smgr" runat="server" />
Error: Microsoft JScript runtime error: Object expected
if (lstRecipient.Items[i].Text == ddlRecipient.SelectedItem.Text)
{
lstRecipient.Items.RemoveAt(i);
isDuplicate = true;
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AlertAdd", "jAlert('Recipient name is already in the list.', 'Duplicate Entry!');", true);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这通常是由于无法解析 jscript 函数而导致的。您有包含 jAlert 函数的 JQuery 库的参考吗?
This is typically caused when a jscript function cannot be resolved. Do you have a reference to the JQuery library containing the jAlert function?