Variable in a control (very basic question)

  • Thread starter Vincent Courcelle
  • Start date
V

Vincent Courcelle

Hello,
My question is very basic but I can't find an answer on search engines
for it.
How can I "pass" a variable to a control in a non programmatic way
(directly in the .aspx file, not through the .aspx.cs file) ?

For example :
<asp:Login ID="LoginUser" runat="server" TitleText=""
InstructionText="<%=Resources.Resource.MyVariable %>"
Width="100%"></asp:Login>

This prints me "<%=Resources.Resource.MyVariable %>" for my login
instruction (not the value it refers to).

Thanks :)
 
P

Patrick.O.Ige

Vincent why don't you want to do it in the codebehind.
And by the what is InstructionText="<%=Resources.Resource.MyVariable %>?
what are u trying to return in the using the login control??
Patrick
 
V

Vincent Courcelle

Patrick.O.Ige a écrit :
Vincent why don't you want to do it in the codebehind.
And by the what is InstructionText="<%=Resources.Resource.MyVariable %>?
what are u trying to return in the using the login control??
Patrick

Hello,
I'm trying to localize a website.
As I never put my sentences like "Hello world" in the codebehind, I
would like this not to be in the code behind too, which is much more
logic (split between code and presentation/sentences must stay).
I simply would like to print a langage aware instruction string in my
login control, I think the way to pass any variable content to a control
would be the same (I took the example of a localized resources, replace
my example with any string variable).

Thanks :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top