从.CS文件调用JavaScript [英] Call javascript from .CS file
本文介绍了从.CS文件调用JavaScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我做了一个JavaScript,弹出一个消息框.我在aspx页面上调用它没有问题,但是我找不到从.cs文件(类文件)调用它的方法.任何帮助将不胜感激.
谢谢,
Franco
Hi,
I made a javascript that pops-up a message box. I do not have problem calling it on the aspx page but i can''t find a way to call it from a .cs file (class file). Any help is greatly appreciated.
Thanks,
Franco
推荐答案
我相信这篇文章
I believe that this article, Use & Call RegisterStartUpScript, RegisterClientScript and Client-Side Script[^] will help you.
ScriptManager.RegisterStartupScript(this.Page,this.GetType(),"," RedirectPage();,true) ;
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "RedirectPage();", true);
这篇关于从.CS文件调用JavaScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文