Hello friends,
View in cshtml
Method in C# controller
a hug
Open an asp.net mvc view through Ext.Ajax.request passing parameters
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");
public ActionResult OpenView (int? prtId, string tipo)
{
...
return View("Index2");
}
a hug
Open an asp.net mvc view through Ext.Ajax.request passing parameters
Aucun commentaire:
Enregistrer un commentaire