Affichage des articles dont le libellé est Open an asp.net mvc view through Ext.Ajax.request passing parameters. Afficher tous les articles
Affichage des articles dont le libellé est Open an asp.net mvc view through Ext.Ajax.request passing parameters. Afficher tous les articles

samedi 28 février 2015

Open an asp.net mvc view through Ext.Ajax.request passing parameters

Hello friends,

I have a controller and a method in asp.net mvc 4, which will receive two parameters and will open a view is triggered.


The problem is that I want to open this view by Ext.Ajax.request the Extjs, and the view is open in a tab or window firefox, chrome or internet explorer.


I tried to use logic below but simply nothing happens. My view (cshtml) has only one tag.


Could you help me solve this issue?


hugs



Code:





  • Ext.Ajax.request({

  • scope:this,

  • url:'/Home/OpenView',

  • params:{

  • prtId: id,

  • tipo: tipo

  • },

  • failure:function(){

  • Ext.Msg.alert('Erro','Erro server');

  • }

  • });



View in cshtml

Code:



@{
Layout = null;
ViewBag.Title = "Test View";
}


<h2>Opened View</h2>

Method in C# controller


[HttpPost]

public ActionResult OpenView (int? prtId, string tipo)

{

...

return View("Index2");

}





a hug



Open an asp.net mvc view through Ext.Ajax.request passing parameters