Hi
I have a page which contains a html.RenderPartial, that renders an aspnet mvc partial view.
The partial view is used as a jquery dialog and is opend from the page where it is rendered. The problem is that inside the partial view I want to load and store a variable when the dialog is displayed. This data is used for some lookup while working inside the dialog. But when the page with the partial view loads, the jquery getJson inside the partialview gets called twice, why??
The code inside the partial view looks like this:
<script type="text/javascript">
$(function() {
var groups = null;
$.getJSON("/RessourceGroup/List", null, function(data) {
groups = data;
});
I can see in firebug the Page (view) is loaded once, but the script above in the partial view is still called twice, why why?