jquery - Using ASPX pages in a MVC project using div.load 404'd? -


unfortunatly need render aspx pages in mvc project due legacy software. , think need using jquery's load method , load aspx page div. i've got mvc3 project. project contains homecontroller index method , ofcourse index view.

homecontroller:

using system; using system.collections.generic; using system.linq; using system.web; using system.web.mvc;  namespace combiningmvcandaspx.controllers {     public class homecontroller : controller     {         //         // get: /home/          public actionresult index()         {             return view();         }       } } 

which return index view:

<script type="text/javascript">    $(document).ready(function () {        alert('loading dashboard...');        $('#dashboard').load('~/webforms/webform1.aspx', function (response, status, xhr) {             if (status == "error") {                 var msg = "sorry there error: ";                 $("#error").html(msg + xhr.status + " " + xhr.statustext);             }         });     }); </script> @{     viewbag.title = "index"; } <h2>     index</h2> <div id="dashboard"> </div> <div id="error"> </div> 

webform1.aspx page want load in dashboard div. unfortunatly error 404 not found. not suprising on since routing in mvc works differently ofcourse. google fu letting me down , i'm not proficient enough in mvc solve on own. please me out? thank in advance thinking me.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -