Mar 09, 2011, 12:24 PM
Return a parameter MVC
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)
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.mailingid);
};
</script>
.......
<ext:Button ID="SaveButton" runat="server" Text="Subir Datos" Disabled="true" AnchorHorizontal="100%" Scale="Small" IconAlign="Bottom" Icon="PageWhiteExcel" >
<DirectEvents>
<Click Url="/Data/UploadData/" IsUpload="true" CleanRequest="true" Method="POST"
Success="#{dataLoad}.show();#{SaveButton}.setDisabled(true);#{camp}.setDisabled(false);load();successHandler();"
Failure="Ext.Msg.show({
title : 'Error',
msg : 'Archivo no compatible. Error al procesarlo',
minWidth: 200,
modal : true,
icon : Ext.Msg.ERROR,
buttons : Ext.Msg.OK
});">
<ExtraParams>
<ext:Parameter Name="id" Value="#{camp}.getValue()" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
<ext:Hidden ID="listaid" Text="" runat="server"></ext:Hidden>
code-behind 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