View Full Version : Return a parameter MVC

Mar 09, 2011, 1:24 PM
I try to return a value, after calling the method "UploadData."
I try to Save to "listaid"
But I can not do.

(Sorry for my bad English)

<script type="text/javascript">
var successHandler = function (form, action) {
listaid.setValue(action.result.extraParams.mailing id);


<ext:Button ID="SaveButton" runat="server" Text="Subir Datos" Disabled="true" AnchorHorizontal="100%" Scale="Small" IconAlign="Bottom" Icon="PageWhiteExcel" >

<Click Url="/Data/UploadData/" IsUpload="true" CleanRequest="true" Method="POST"

Success="#{dataLoad}.show();#{SaveButton}.setDisabled(true) ;#{camp}.setDisabled(false);load();successHandler( );"

title : 'Error',
msg : 'Archivo no compatible. Error al procesarlo',
minWidth: 200,
modal : true,
icon : Ext.Msg.ERROR,
buttons : Ext.Msg.OK

<ext:Parameter Name="id" Value="#{camp}.getValue()" Mode="Raw" />

<ext:Hidden ID="listaid" Text="" runat="server"></ext:Hidden>


public AjaxFormResult UploadData(string id, FormCollection values)
response.ExtraParams.Add(new Parameter { Name = "mailingid", Value = mailingid, Mode = ParameterMode.Value });
response.Success = true;
response.IsUpload = true;
return response;

Any ideas? Thank you very much