我希望警报messgae与全球化asp.net..pls帮助我 [英] i want alert messgae with globalization asp.net..pls help me
本文介绍了我希望警报messgae与全球化asp.net..pls帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
iam使用多语言网站...我的问题是警报消息....如何编写代码...
所有准备好iam使用javascript提醒信息...
代码:
ScriptManager.RegisterStartupScript(Me ,[GetType](),ShowMessageScript,alert('Resources.Resource.lbldelmsg');,True)
这段代码不起作用...如何解决这个问题.......
解决方案
参考
http://forums.asp.net/t/1742430.aspx [ ^ ]
http://www.codemag.com/article/0503081 [ ^ ]
希望这个帮助
试试吧是: -
详细信息: -
GlobalMessages: - 全局消息文件名
msgBoxInvalidUserId: - 警报箱名称在该全局资源文件中
使用如下: -
message = Resources.GlobalMessages.msgBoxInvalidUserId
ScriptManager.RegisterClientScriptBlock(Me.Page,GetType( String ), AltBox1, AlertBox('&消息& ');,True)
>
string message = GetGlobalResourceObject( ResxfileName, KeyName);
string script = String .Format( < script language ='javascript'> alert('{0}');< / script>,message) ;
cs.RegisterStartupScript(csType,csName,script);
你试过这个吗?
iam using multi-language website... my problem is alert message.... how to write code...
all ready iam using javascript for alert message...
Code:
ScriptManager.RegisterStartupScript(Me, [GetType](), "ShowMessageScript", "alert('Resources.Resource.lbldelmsg');", True)
this code not working...how tosolve this problem.......
解决方案
Refer
http://forums.asp.net/t/1742430.aspx[^]
http://www.codemag.com/article/0503081[^]
Hope this helps
try like this:-
details:-
GlobalMessages:- global message file name
msgBoxInvalidUserId:- alertbox name in that global resource file
use like below:-
message = Resources.GlobalMessages.msgBoxInvalidUserId ScriptManager.RegisterClientScriptBlock(Me.Page, GetType(String), "AltBox1", "AlertBox('" & message & "');", True)
string message = GetGlobalResourceObject("ResxfileName","KeyName"); string script = String.Format( "<script language='javascript'>alert('{0}');</script>", message); cs.RegisterStartupScript(csType, csName, script);
have you tried this?
这篇关于我希望警报messgae与全球化asp.net..pls帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文