This is a migrated thread and some comments may be shown as answers.

[Solved] Insert PopUp Form error 500

1 Answer 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paulo de Tarso
Top achievements
Rank 1
Paulo de Tarso asked on 18 Feb 2011, 04:11 PM
Sorry my english.
I use MVC3 with Razor
I use the example GridToolbarCrud but i change to mode PopUp Form.
Delete and update is working but Insert doesn't.

Controller:
           bool bln_Upd = objElementoAdo.ElementoIns(p_objElementoDto);

            

            objElementoDto.TipoConsulta = (int)ElementoDto.enumTipoConsulta.porParametro;

            //Rebind the grid
            return View(new GridModel(objElementoAdo.ElementoSel(objElementoDto)));

In View:
            // "Create" button - when pressed shows the "new record" user interface
            tools.Custom().Text("Novo").HtmlAttributes(new { onclick = "return beginInsert()" });
            // "Insert" button - when pressed inserts the new record. Initially hidden. Shown when the "Create" button is pressed.
          //  tools.Custom().Text("Salvar").HtmlAttributes(new { onclick = "return endInsert()", style = "display:none", @class = "insert" });

above I comment the button "Salvar" (Insert)...

the return View(... is like the update command.

The insert into table is working but i receive error 500

what's wrong?

Tks

Paulo


1 Answer, 1 is accepted

Sort by
0
Paulo de Tarso
Top achievements
Rank 1
answered on 18 Feb 2011, 05:36 PM
It's work

Tks
Tags
Grid
Asked by
Paulo de Tarso
Top achievements
Rank 1
Answers by
Paulo de Tarso
Top achievements
Rank 1
Share this question
or