c# - Embedded code (<%= %>) in button control -


i'm working on project i'm using <%= getstring("key")%> dynamically appropriate text.

this works great when use in simple p tags, can't find way controls button/label etc.

is there way, other calling

mybutton.text = getstring("key"); 

to dynamically add text.

the idea getstring retrieves af language code, , depending on code gets string in appropiate language.

i've been looking around, come across using embedded code tags directly in aspx pages, wont cut buttontext.

if can use databinding instead of <%= operator, can use:

<asp:button id="mybutton" text='<%# getstring("key") %>' /> 

this explanation of why <%= won't work in context.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -