Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using Resources getting error : "Literal expressions like ..."

Status
Not open for further replies.

unuktine

Programmer
Sep 15, 2003
9
0
0
RO
Hi,

I want to show a text depending on what language is selected ... and that by a client-side script.

What's wrong in my next javascript example :

...
<script language=javascript>
function btclick()
{
document.getElementById("<%=mytxt.ClientID %>").value="<% $ Resources:myResource, myText %>";
}

</script>
...

I'm getting the following error :

**************************
Parser Error Message: Literal expressions like '<% $ Resources:myResource, myText %>' are not allowed.
Use <asp:Literal runat="server" Text="% $ Resources:myResource, myText %>" /> instead.

Source Error:


Line 15: document.getElementById("<%=mytxt.ClientID %>").value='<% $ Resources:myResource, myText %>';
***************************

I cannot use "Literal" in this situation ... ! right ?

10x

D.
 
forgive me for my ignorance but what language are u using?

<% $ Resources:myResource, myText %>

Known is handfull, Unknown is worldfull
 
thanks...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top