1

I read this link Loading a partial view in jquery.dialog, but since I am still new, I dont know where should I put the codes. Should I put it in my partial view or to the page where the link to create is?..

I'm really new to it and really need some help.

Community
  • 1
  • 1
lou lising
  • 71
  • 11

1 Answers1

0

You need to put the script that will load the dialog on a view where you will call the partial view.

fullview.cshtml (example view)

<h1>Some markup goes here</h1>
<div id="dialog" title="Create Album" style="overflow: hidden;">
<script type="text/javascript">
    $(function () {
        $('#dialog').dialog({
        });
    });
</script>
von v.
  • 16,868
  • 4
  • 60
  • 84
  • I tried it but it just move to another page, no dialog box is popping, does it have to do with my actionlink? because I just want click the create album link then the dialog box will pop up.. – lou lising May 07 '13 at 03:49
  • Actionlink? Unless you did not target your action link and cancel the click event on it (ie. `e.preventDefault`) then it will definitely go to another page. – von v. May 07 '13 at 04:35
  • I didn't use prevent default and as for the actionlink, it goes like this @Html.ActionLink("Create new","CreateAlbumPartial"); Is there still something lacking on the script or something i should edit?. – lou lising May 07 '13 at 04:56
  • got it, there were minor configuration but still I got it.. Thanks for the help, well appreciated. – lou lising May 08 '13 at 09:29