Friday, November 19, 2010

Add JavaScript to handle two scripts in ASP.NET

protected void ApplyJavaScriptForPostToIris()


{

System.Text.StringBuilder sbValid = new System.Text.StringBuilder();

sbValid.Append("if (confirm('Are you sure you want to post this file to app') == true){");

sbValid.Append("this.disabled = true;");



sbValid.Append("} else { return false;}");

sbValid.Append(this.ClientScript.GetPostBackEventReference(this.btnPostToIRIS, "") + ";");



this.btnPostToIRIS.Attributes.Add("onclick", sbValid.ToString());

}
Post a Comment