Microsoft JScript运行时错误:调用javascript方法时对象出现问题

时间:2016-04-27 14:21:58

标签: javascript

我正在调用javascript方法并面临此问题。请帮我 这是我的代码

protected void btn_PostBack_onClick(object sender, EventArgs e)
{
    try
    {
        string PageName = "", URL = "";
        int uploadID = 0;
        Session["DueData"] = hfSalesTax.Value;
        ClientScript.RegisterStartupScript(GetType(), "ShowAlert", "Javascript:ClosePopUp()", true);
    }
    catch (Exception ex)
    {
        throw ex;
    }
}

1 个答案:

答案 0 :(得分:0)

请在调用javascript方法后添加semocolon

像: ClientScript.RegisterStartupScript(GetType()," ShowAlert"," Javascript:ClosePopUp();",true);