У меня есть следующая иерархия страниц

Я хочу выполнить PageMethod, если я нажму кнопку «Сохранить», поэтому я закодировал, как показано ниже
При нажатии кнопки Я позвонил
OnClientClick="return btnSaveAS_Clicked()"
Вызвал следующее на PageLoad внутреннего пользовательского элемента управления
private void RegisterJavaScript()
{
StringBuilder jScript = new StringBuilder();
jScript.Append("<script type='text/javascript'>");
jScript.Append(@"function btnSaveAS_Clicked() {
var txtConditionName = document.getElementById('" + txtConditionName.ClientID + @"').value;
PageMethods.Combine('hello','world', OnSuccess);
function onSuccess(result)
{
alert(result);
}
}");
jScript.Append("</script>");
Page.ClientScript.RegisterStartupScript(this.GetType(), "conditions_key", jScript.ToString());
}
Метод кодированной страницы как
[WebMethod]
public static string Combine(string s1, string s2) {
return s1 + "," + s2;
}
Новыдает следующую ошибку ...
