tags:

views:

41

answers:

1

in my .aspx page i have something like this:

    <select id="seltemp" onchange="calltemp()">
<option value="0" selected="selected">Select Template</option>
<option value="1">Template1</option>
<option value="2">Template2</option>
<option value="3">Template3</option>
<option value="4">Html Template</option>
</select>

        <script type="text/javascript">
        function calltemp() {
            document.getElementById('datashow').innerHTML = "";


            var id = (document.getElementById('seltemp').value);
            if (id != 0) {debugger;
                $.get("/Templates/Select/" + id + "/", function(result) {

                    $("#Renderthisdiv").html(result);
                });
            }
        }         
    </script>

and in TemplatesController

public ActionResult Select(int id)
    {
        ......
        ......
        return View("/Views/Templates/Temp1.htm");

    }

please help me to render Temp1.htm page into "Renderthisdiv" div

+1  A: 
return File("~/Views/Templates/Temp1.htm", "text/html");

-- Modified

deerchao
it gives error sayingno overload for 'File' takes 1 arguments
dexter
Sorry for that, try this:return File("~/Views/Templates/Temp1.htm", "text/html");
deerchao
oh...that worked thanks
dexter