简体   繁体   中英

ASP.NET MVC message box from controller to view

private void Inserir()
    {mdc = new ModelDataContext();
try
        {
            Tbl_Controle_Procedimento procedimento = new Tbl_Controle_Procedimento();
            //dados do paciente
            procedimento.paciente = Convert.ToDecimal(TxtCns.Text.Trim());
            procedimento.nome = TxtNome.Text.Trim();
            procedimento.regiao = DrpSetor.SelectedValue;
            procedimento.complexidade = DrpComplexidade.Text;
            procedimento.colonizador_multi = DrpColonizador.Text;
            procedimento.diagnostico = DrpDiagnostico.Text;
            procedimento.cid_assossiado = TxtCidAssossiado.Text;
            mdc.Tbl_Controle_Procedimentos.InsertOnSubmit(procedimento);
Page.ClientScript.RegisterClientScriptBlock(GetType(), "alerta", "alert('Save records with success')", true);
}

I am using this statement to show the msg for the user, but this message box is not as same as Windows Message box. Can any one tell me how i can replace this with windows message box.

The message box is specific to browser it is not specific to operating system..you can see diffrent messagebox in differnt browser...and this messagebox are generated by browser using javascript ..

If you want to make uniform messagebox than you can make use of jQuery-UI Dialog ....

Tutorial : JqueryUI - Dialog

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM