【发布时间】:2011-03-25 08:51:26
【问题描述】:
当以下条件匹配时我收到此错误,我在内容页面中使用以下代码,在我的母版页中我有这个
<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);
}
【问题讨论】:
-
如果你的页面有 JavaScript 函数,把 Return False, stackoverflow.com/questions/855360/…
标签: c# asp.net scriptmanager