任何人都可以幫助我逐行描述下面的代碼。客戶端腳本並獲取回調事件引用。
protected override void OnPreRender(EventArgs e)
{
String eventRef = Page.ClientScript.GetCallbackEventReference(this, "", "", "");
// Register include file
String includeScript = Page.ResolveClientUrl("~/ClientScripts/AjaxValidator.js");
Page.ClientScript.RegisterClientScriptInclude("AjaxValidator", includeScript);
// Register startup script
String startupScript = String.Format("document.getElementById('{0}').evaluationfunction = 'AjaxValidatorEvaluateIsValid';", this.ClientID);
Page.ClientScript.RegisterStartupScript(this.GetType(), "AjaxValidator", startupScript, true);
base.OnPreRender(e);
}