It is very easy to call javascript function from code behind asp.net .
In .cs code write
string url = "yourpage.aspx?ManiFestNumber=" + value;
ScriptManager.RegisterClientScriptBlock(this, GetType(), "rates", "openWindow('" + url + "');", true);
in aspx page just write in this code
<script type="text/javascript">
function openWindow(url)
{
var w = window.open(url, '', 'width=1,height=1,toolbar=0,status=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0');
w.focus();
}
and Its done .........
In .cs code write
string url = "yourpage.aspx?ManiFestNumber=" + value;
ScriptManager.RegisterClientScriptBlock(this, GetType(), "rates", "openWindow('" + url + "');", true);
in aspx page just write in this code
<script type="text/javascript">
function openWindow(url)
{
var w = window.open(url, '', 'width=1,height=1,toolbar=0,status=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0');
w.focus();
}
and Its done .........
No comments:
Post a Comment