RegisterStartUpScript在另一个类中? [英] RegisterStartUpScript in another class?
本文介绍了RegisterStartUpScript在另一个类中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
RegisterStartUpScript在另一个类中进行泛化,以便可以用作函数调用.
解决方案
选中此选项.
http://madskristensen.net/post/JavaScript-AlertShow(e2809dmessagee2809d)- from-ASPNET-code-behind.aspx [ 解决方案
Check this.
http://madskristensen.net/post/JavaScript-AlertShow(e2809dmessagee2809d)-from-ASPNET-code-behind.aspx[^]
RegisterStartupScript
is already a method ofSystem.Web.UI.Page
control and can be used in any webpage that derives fromSystem.Web.UI.Page
.
The overload that you are trying to create will add NO other functionality to the method, so no point creating one.
So instead of trying to callClassName.OverloadedRegisterStartupScript
, call it like Page.RegisterStartupScript. Isn''t it doing the same thing?
You Can write a Script in which there could be functions like javascript etc.
这篇关于RegisterStartUpScript在另一个类中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文