i have a module controller which returns(renders) a view page (.aspx) into the main.aspx page
but now i want the controller to return the entire content of .aspx page to the javascript function from where this controller has been called
pls help
my calling function in main.aspx
$.get('/Module/Select/',
{ TemplateName: TemplateName }, function(result) {
alert(result);
});
my controller
public ActionResult Select(string TemplateName)
{
return View(TemplateName);
}
it should return content of 'TemplateName' to the function( result){....}
Html.ActionLink()for generating URLs to action methods, since routing will be taken into account automatically. Also, "returns(renders)" is a non-sequitur, as is "a view page ... into the main.aspx page". You may want to read up on your ASP.NET MVC fundamentals. :)