Click here to Skip to main content
15,899,026 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
XML
i had javascript function i have to call that function from .cs file not at onclientclick only at button click event in .cs file

<pre lang="xml">&lt;script type=&quot;text/javascript&quot;&gt;
    function RedirectPage()
    {
        var myForm = document.getElementById( &quot;frmTransaction&quot; );
        if(myForm &amp;&amp; myForm.action  != null )
        {
            myForm.action = &quot;https://secure.ebs.in/pg/ma/sale/pay/&quot;;
        }
    }
    &lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;</pre>
Posted

Search it on google and you will find a lot of links with the entire code

link1[^], link2[^], link3[^]....
 
Share this answer
 
Comments
thatraja 2-Aug-11 11:22am    
5!
You can use the following line to solve your problem. But make sure ScriptManager exists in your master/content page.
C#
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "RedirectPage();", true);

For further information please click here
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900