Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Variable in a control (very basic question)

Reply
Thread Tools

Variable in a control (very basic question)

 
 
Vincent Courcelle
Guest
Posts: n/a
 
      08-03-2006
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
 
Reply With Quote
 
 
 
 
Patrick.O.Ige
Guest
Posts: n/a
 
      08-03-2006
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

"Vincent Courcelle" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Vincent Courcelle
Guest
Posts: n/a
 
      08-03-2006
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Variable variable name" or "variable lvalue" mfglinux Python 11 09-12-2007 03:08 AM
What is the difference between Visual Basic.NET and Visual Basic 6? Jimmy Dean Computer Support 3 07-25-2005 07:05 AM
Python interpreter in Basic or a Python-2-Basic translator. Engineer Python 6 05-01-2005 10:16 PM
How do I scope a variable if the variable name contains a variable? David Filmer Perl Misc 19 05-21-2004 03:55 PM
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET Jaime MCSD 2 09-20-2003 05:16 AM



Advertisments