title: Pass value from view, ---> Jquery --->another view
body: <p>The first view, containing the value i want to pass along looks like this:</p>
  
  <pre><code>@foreach (var item in Model.BlogPosts)
      {
        @item.Id &lt;---This is the id i want to pass along
        &lt;div id="allphotos"&gt;&lt;p&gt;Från bildbank&lt;/p&gt;&lt;/div&gt;
      }
  </code></pre>
  
  <p>This is the Jquery triggered by the #allphotos. I need to have the @item.Id with me in here if possible.</p>
  
  <pre><code>$("#allphotos").click(function () {
  
      $("&lt;div&gt;&lt;/div&gt;")
          .addClass("dialog")
          .appendTo("body")
          .dialog({
          close: function () {
              $(this).remove();
          },
          modal: true,
          height: 600,
          width: 700
      })
          .load("/Home/AllPhotos");
  });
  </code></pre>
  
  <p>The Jquery opens up a dialog and in this dialog i need to be able to acess the @item.Id somehow.</p>
  
  <p>Here is the "final"-view where i need to acess the Id:</p>
  
  <pre><code>@model aPhoto_web.Models.AdminPages.AdminViewModel
  
  /* Somewhere here i need to be able to read the @itemId in order to be able to pass it in the actionlink below. */
  
  @foreach (var item in Model.Photographys)
  {
      &lt;img id="imga" style="max-width: 100px;" src="@item.ImgUrl" /&gt;
      &lt;p&gt;@item.ImgUrl&lt;/p&gt;
      @Html.ActionLink("Create New Part", "SetBlogImg", "Home", new {contId = @item.Id, imgurl = @item.ImgUrl}, null)
   }
  </code></pre>
  
  <p>Is it possible to achieve this somehow?
  Thanks!</p>