473,549 Members | 2,708 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.MyVari able %>"
Width="100%"></asp:Login>

This prints me "<%=Resources.R esource.MyVaria ble %>" for my login
instruction (not the value it refers to).

Thanks :)
Aug 3 '06 #1
2 1142
Vincent why don't you want to do it in the codebehind.
And by the what is InstructionText ="<%=Resources. Resource.MyVari able %>?
what are u trying to return in the using the login control??
Patrick

"Vincent Courcelle" <ne**@5en1.comw rote in message
news:us******** ******@TK2MSFTN GP02.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.MyVari able %>"
Width="100%"></asp:Login>

This prints me "<%=Resources.R esource.MyVaria ble %>" 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.MyVari able %>?
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
14988
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 variable ($pagetitle). How do I get the value before the code for the <title> is written. This is just a
83
6432
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 C. It can cause very ugly errors,like this: epsilon=0 S=0 while epsilon<10: S=S+epsilon
1
3569
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. One of these user controls handles the navigation. This user control polls the database for the section headers that the current user has access...
12
2917
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 gen.aspx.vb and uc.ascx.vb. With simple html or self contained vb in the user control, everything is fine and dandy. So the next stage is to pass back...
3
1823
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 answer. I'd appreciate and help. Thanks. What I'm doing is creating a treeview with the structure as follows (this is the expanded view): -...
3
3842
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 when for loads. How do I use a variable control name. This is what I'm trying to do below but of course it doesn't work, I'm rookie. Thanks ...
6
8213
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 not recognize this statement. Loop Until Len(Buffer) > 0
7
2568
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 upgraded to VB.NET, and I have a lot of catching up to do. That being said, I have come a long way in a short while, however, I am stumped at the...
10
1430
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 delivers the same value, 1. When I increment the variable from the button, shouldn't it hold the new value? I also tried declaring the variable as a...
0
7524
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7475
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7812
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6048
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5089
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3501
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1944
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 we have to send another system
1
1061
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
766
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.