How to read data from resource .rex file in java script?

  • Thread starter Thread starter chandan
  • Start date Start date
C

chandan

Hi,
How can I show that message in alert code ( in java script) that
pick the data form resouse .rex file .

Thanks in advance.
Chandan
 
How can I show that message in alert code ( in java script) that
pick the data form resouse .rex file .

protected void Page_Load(object sender, EventArgs e)
{
bool blnSomeCondition = false;
// code to populate blnSomeCondition...

if (blnSomeCondition)
{
string strTextFromResx = String.Empty;
// read the text from the resource file into the strTextFromResx
variable
ClientScript.RegisterStartupScript(GetType(), "resxMsg", alert('" +
strTextFromResx + "');", true);
}
else
{
// rest of Page_Load method...
}
}
 
You can't do it, at least not directly.

If you emit the JavaScript, however, you can set it up based on the user's
language preference when the page is built.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
Back
Top