i'm trying to launch a new preview page, for this i'm trying to call when we click on the image. And also i need to pass a ID as parameter to the new page. & i want to receive it in public ActionResult Index
method. Here is the code which i have tried.
From parents index.aspx
<a href="#" onclick="openWindow('Preview/Index.aspx?ID = 12344');"><img style="border:0;" src="/Content/Images/approveIcon.png" alt="HTML try" width="20" height="20" /></a>
<script language='Javascript'>
<!--
// Function to open new window containing window_src, 100x400
function openWindow(window_src) {
window.open(window_src, 'newwindow', config = 'height=100, width=400, '
+ 'toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, '
+ 'directories=no, status=no');
}
-->
</script>
Here is my new preview controller class
public class PreviewController : Controller
{
//
// GET: /Preview/
public ActionResult Index(String ID)
{
return View();
}
}
I'm getting resource missing error, How to launch new preview window and pass ID as parameter to index method?