Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
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.......
Posted
Updated 7-Jan-14 20:46pm
v3

 
Share this answer
 
v2
Comments
akhil.krish 8-Jan-14 3:18am    
hi jocodes.... not working......
JoCodes 8-Jan-14 3:47am    
Can you show the modified code?
try like this:-

details:-
GlobalMessages:- global message file name
msgBoxInvalidUserId:- alertbox name in that global resource file

use like below:-
C#
message = Resources.GlobalMessages.msgBoxInvalidUserId
 ScriptManager.RegisterClientScriptBlock(Me.Page, GetType(String), "AltBox1", "AlertBox('" & message & "');", True)
 
Share this answer
 
C#
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?
 
Share this answer
 
Comments
akhil.krish 14-Jan-14 0:36am    
Hi gitanjali singh... if u possible send vb.code......
ScriptManager.RegisterStartupScript(Me, [GetType](), "ShowMessageScript", "alert('" + Resources.Resource.lbldelmsg + "');", True)
 
Share this answer
 

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