protected void Page_Load(object sender, EventArgs e) { //ScriptManager.RegisterClientScriptBlock(this, GetType(), "mykey", "myFunction();", true); //ScriptManager.RegisterStartupScript(this.Page, GetType(), "key", "myFunction();", true); delegadoClase = new MethodCallBack(DelegateMethod); }
private void MofifiedControlLoop(MethodCallBack delegado) { //this.txtNickName.Text = "hooolawww"; //while(true) { //this.txtNickName.Text = "hooolawwwddd"; MofifiedControl(delegado); } }
private void MofifiedControl(MethodCallBack delegado) { //this.txtNickName.Text = "hooola"; ScriptManager.RegisterStartupScript(this.Page, GetType(), "key", "myFunction22();", true); if (delegado != null) { delegado("un mensaje"); } //delegado.Invoke("un mensaje"); //Method nom = new Method(""); //nom.Invoke("hola"); }