Ajax.ActionLink not placing the rendered content in same page. Instead it open up a new page???http://forums.asp.net/t/1815855.aspx/1?Ajax+ActionLink+not+placing+the+rendered+content+in+same+page+Instead+it+open+up+a+new+page+Tue, 19 Jun 2012 07:31:07 -040018158555031502http://forums.asp.net/p/1815855/5031502.aspx/1?Ajax+ActionLink+not+placing+the+rendered+content+in+same+page+Instead+it+open+up+a+new+page+Ajax.ActionLink not placing the rendered content in same page. Instead it open up a new page??? <p>hi,&nbsp;</p> <p>&nbsp; I am using Ajax.actionlink helper method to show a partial content in same page. But, its not behaving as like i expected. It opened the rendered partial view in new page. How to resolve it ? I have included all jQuery and Microsoft ajax js files in script folder. Please help... heres the code.&nbsp;</p> <p></p> <pre class="prettyprint">&lt;div id=&quot;ExampleOfAjaxLink&quot;&gt; @Ajax.ActionLink(&quot;EditAjax&quot;, &quot;EditAjaxTest&quot;, new AjaxOptions { HttpMethod = &quot;Get&quot;, UpdateTargetId = &quot;ExampleOfAjaxLink&quot;, InsertionMode = InsertionMode.Replace }) &lt;/div&gt;</pre> <p></p> <p>and in controller i have written like this</p> <pre class="prettyprint">public PartialViewResult EditAjaxTest() { RestaurantReview review = _db.Reviews[0]; return PartialView("_Review", review); }</pre> <p></p> <p>Thanks<br> <br> <br> </p> 2012-06-19T07:19:44-04:005031526http://forums.asp.net/p/1815855/5031526.aspx/1?Re+Ajax+ActionLink+not+placing+the+rendered+content+in+same+page+Instead+it+open+up+a+new+page+Re: Ajax.ActionLink not placing the rendered content in same page. Instead it open up a new page??? <p>Hmm.. why @ajax.actionLink is inside of div that will be replaced? I think it should be</p> <pre class="prettyprint">@Ajax.ActionLink(&quot;EditAjax&quot;, &quot;EditAjaxTest&quot;, new AjaxOptions { HttpMethod = &quot;Get&quot;, UpdateTargetId = &quot;ExampleOfAjaxLink&quot;, InsertionMode = InsertionMode.Replace }) &lt;div id=&quot;ExampleOfAjaxLink&quot;&gt;&lt;/div&gt;</pre> <p>The action controller should be&nbsp;</p> <pre class="prettyprint">public <span style="text-decoration: underline;">ActionResult</span> EditAjaxTest() { RestaurantReview review = _db.Reviews[0]; return PartialView("_Review", review); }</pre> <p><br> Hopefully this answers your question.</p> <p>Danny Mualim<br> <br> </p> 2012-06-19T07:30:39-04:005031527http://forums.asp.net/p/1815855/5031527.aspx/1?Re+Ajax+ActionLink+not+placing+the+rendered+content+in+same+page+Instead+it+open+up+a+new+page+Re: Ajax.ActionLink not placing the rendered content in same page. Instead it open up a new page??? <p>Hi everyone i solved it .</p> <p>We have to include the &nbsp;&quot;jquery.unobtrusive-ajax.min.js&quot; file reference in the view.&nbsp;</p> <pre class="prettyprint">&lt;script src=&quot;@Url.Content(&quot;~/Scripts/jquery.unobtrusive-ajax.min.js&quot;)&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre> <p></p> 2012-06-19T07:31:07-04:00