Sunday, 15 January 2012

asp.net mvc - How I can open MVC View as popup window from controller action -



asp.net mvc - How I can open MVC View as popup window from controller action -

how can open asp.net mvc partial view popup window controller action? don't want attach view model class should open controller action. give thanks you.

first of have understand how asp.net mvc works.

you want open popup window partial view straight controller action.

as per sentiment controller action not aware of thing have open popup window or not. responsibility server request. how display depend on view.

let me give little illustration or little step.

create 1 partial view

in controller write 1 action ( controller illustration homecontroller)

public actionresult save() { homecoming partialview("save"); }

in main view have open popup window next thing.

$.ajax({ type: 'get', url: '/home/save' , success: function(data){ $('#popupdiv').html(data); $('#popupdiv').show(); } });

above code steps , upto popup window have utilize telerik , bootstrap or own implementation.

asp.net-mvc asp.net-mvc-4 asp.net-mvc-partialview

No comments:

Post a Comment