Thursday, March 22, 2012

Call JavaScript function from code behind in

It is very easy to call javascript function from code behind .

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 =, '', 'width=1,height=1,toolbar=0,status=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0');

and Its done .........

No comments:

Post a Comment