title: open a new window of view when call controller from Jquery Ajax post call
body: <p>I'm using ASP.Net MVC2. I'm trying to open a new window of view when call controller from Jquery Ajax post call.
  here is my code..
  in ascx page..</p>
  
  <pre><code>$('#DeleteButton').click(function () {
  
              var isLineChecked = $(':checkbox:checked', '#providerSearchResultsTable').length;
  
              if (isLineChecked == 0) {
                  alert("Please select at least one row ");
                  return false;
              }
  
              else {
  
                  var params = {
                      Id: gaiSelected.join(',')
  
                  };
  
                  alert(params);
                  $.ajax({
  
                      type: "Post",
                      url: "SelectProviderAndContact",
                      data: params,
                      success: function (html) {
                          **//$('#SelectProviderAndContact').html(html);**
      }
                  });
  
              }
   });
  </code></pre>
  
  <p>here is my controller Action method</p>
  
  <pre><code>[SessionFilter]
          public ActionResult SelectProviderAndContact(string Id)
          {
              try
              {
                  List&lt;ProviderBaseInfo&gt; providerList = null;
                  string[] internalProviderIDs = Id.Split(",".ToCharArray());
                  //string[] billingProviderNames = billingProvider.Split(",".ToCharArray());
  
                  IStateBag stateBag = _commonModel.GetStateBag();
                  //stateBag.SetValue("InternalProviderId", Id);
                  List&lt;Guid&gt; internalProviderIds = new List&lt;Guid&gt;();
                  foreach (var a in internalProviderIDs)
                  {
                      internalProviderIds.Add(new Guid(a));
                  }
  
                  List&lt;Contacts&gt; providerContactList = _providerModel.GetProviderContactlist(internalProviderIds);
  
                  if (providerContactList.Count &lt;= 0)
                  {
                       //IStateBag stateBag = GetStateBag();
                      List&lt;ProviderBaseInfo&gt; providers = (List&lt;ProviderBaseInfo&gt;)stateBag.GetValue(ProviderListCache);
  
                  if (providers == null)
                  {
                      providerList = _providerModel.GetProviderCompleteList(null, null, null, null, Id).ToList();
  
                  }
                  else
                  {
                      providerList = providers.Where(x =&gt; internalProviderIds.Contains(x.InternalProviderId)).ToList();
                  }
  
                  providerContactList = _providerModel.GetContactlistbyInsertingProviders(providerList);
                  }
  
                  ViewData["ProviderNotFound"] = false;
  
                 // ViewData["ProviderName"] = new SelectList(billingProvider.Select(x =&gt; new { value = x, text = x }), "value", "text");
                  var Provider = new[] { 
                  new { ProviderId = "A", Providername = "A" }
                  //new DataContracts.RegionKeyValues { RegionId = "B", RegionValue = "B" }, 
                  //new DataContracts.RegionKeyValues { RegionId = "D", RegionValue = "D" } 
              };
                  ViewData["ProviderName"] = new SelectList(Provider, "ProviderId", "Providername");
  
                  **return View("SelectProviderAndContact",providerContactList);**
  
  
  
              }
              catch (FaultException&lt;MedicareFault&gt; ex)
              {
                  if (ex.Code.Name == typeof(ArgumentException).Name)
                  {
                      ViewData["ProviderNotFound"] = true;
                      ViewData["Error"] = ex.Reason;
                      return View((object)null);
                  }
                  else
                  {
                      ViewData["Error"] = Errors.Common.UnknownError;
                      return View((object)null);
                  }
              }
              catch
              {
                  ViewData["Error"] = Errors.Common.UnknownError;
                  return View((object)null);
              }
          }
  </code></pre>
  
  <p>and I have created <code>SelectProviderAndContact.aspx</code> in view.</p>
  
  <p>Please any one help me to open another window with <code>SelectProviderAndContact.aspx</code>
  from ajax post call.</p>