C# run Javascript from button click

Posted by ABB on Stack Overflow See other posts from Stack Overflow or by ABB
Published on 2010-03-17T21:34:47Z Indexed on 2010/03/17 21:41 UTC
Read the original article Hit count: 435

Filed under:
|
|

I have a button on my .aspx interstitial page. When I click it the onClick event fires off and it does a bunch of validations in the code. I have a javascript function that I need to call/run AFTER these validations are performed. This javascript function closes the interstitial page. How can I call the javascript function from my C# code? I've tried adding a script manager and a client script but neither work. What else besides these two options do I have? I'd be willing to use a hack if it works. Javascript I'm using:

javascript:parent.interstitialBox.closeit(); return false

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp