I am completely new to mvc and trying to create a dummy application for learning mvc 3. I worked my way through the music store example and now I am trying to expand it in a more real world. With an example, when you want some new element, you are redirected to Create, but that’s good, but I want instead of doing a full page post back. I want to use jquery.dialog to open a modal popup that will allow the user to insert a new element.
still i
<script type="text/javascript"> $(function () { $('#dialog').dialog({ autoOpen: false, width: 400, resizable: false, title: "hi there", modal: true, buttons: { "Close": function () { $(this).dialog("close"); } } }); $('#my-button').click(function () { $('#dialog').dialog('open'); });}); </script> <div id="dialog" title="Create Album" style="overflow: hidden;"> @Html.Partial("_CreateAlbumPartial")</div>
The problems with this is a partial view that is not loaded every time through ajax, and I don’t know where I should place the partial view. Shoukld is it in a general location or in a folder with other views? How to update the controller class for partial viewing?
Sorry if this is easy to do, im 3 days in mvc :)
asp.net-mvc-3 razor
Diver Dan Jan 26 '11 at 8:00 2011-01-26 08:00
source share