473,512 Members | 15,089 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Variable in a control (very basic question)

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 :)
Aug 3 '06 #1
2 1140
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" <ne**@5en1.comwrote in message
news:us**************@TK2MSFTNGP02.phx.gbl...
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 :)

Aug 3 '06 #2
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 :)
Aug 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
14981
by: mark | last post by:
IF I have something like this: <title><?php print($pagetitle); ?></title> <body> <?php include("folders/my_include.php"); ?> </body> </html> and my_include.php contains the value to the...
83
6423
by: Alexander Zatvornitskiy | last post by:
Hello All! I'am novice in python, and I find one very bad thing (from my point of view) in language. There is no keyword or syntax to declare variable, like 'var' in Pascal, or special syntax in...
1
3563
by: Steve Gadlin | last post by:
Hi there! First off, let me apologize for the basic question... I'm very new to .NET programming. I'm building a web site using VB.NET, and am trying to include several custom user controls. ...
12
2912
by: Phil Certain | last post by:
Hi, I'm trying to do something very simple...or at least it should be. I have created a host page (gen.aspx) and a very simple user control (us.ascx). The corresponding code-behind files are...
3
1817
by: markaelkins | last post by:
Hi. I am trying to enter a variable in the treenodesrc of a treenode. I am basically trying to send an ID variable into sql to return different records. I've searched everywhere and cannot find the...
3
3838
by: B-Dog | last post by:
I'm capturing the checked radio button to XML file using the name of the radio button. I want to read my xml file to find which button was checked on close and the check the appropriate button...
6
8209
by: Tico Tech | last post by:
Hi: I have a question about the Microsoft Communications Control Version 6.0 from visual studio .net. I have this code: Dim Buffer As String Do Buffer = AxMSComm1.Input() //Error, it does...
7
2564
by: MgGuigg | last post by:
Hello all, This is my first time posting a question to this forum, so here is hoping I am following protocol. I am scraping the rust off my old Basic programming skills, and have just recently...
10
1427
by: Mark A. Sam | last post by:
Hello, I am using Visual Web Developer and decared a Public Variable in the Class section. I assigned a value in the load section, and on a button I set it up to increment, but it always...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.