473,503 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is this ??!

I am a beginner in ASP.NET and web programming in general.

I have seen some examples on the internet in which some text set by
server-side code is "embedded" as a placeholder directly into client-side
html text (in the .aspx file). The syntax in the html text is, for example
:-

<p>Some client-side text and <%=ServerText%></p>

Now in the code-behind module (eg. c#) you can declare a public string
variable named ServerText and assign it to anything you like in Page_Load
and it seems to substitute it into the html stream, eg.

public string ServerText;

private void Page_Load(...)
{
if (!IsPostBack)
{
ServerText = "some server text";
}
}

Lo and behold when the page is rendered my paragraph reads :
Some client-side text and some server text

My questions are :
- what is the proper name for this mechanism ?
- what actually happens at run-time ?
- can anyone point me to some documentation on it (msdn or otherwise) ?
- does the string variable in the code-behind module have to be public ?
Nov 18 '05 #1
1 896
I would recommend downloading the free Microsoft .Net SDK (Software
Developer Kit), from the following URL:

http://www.microsoft.com/downloads/d...displaylang=en

It has many atricles, tutorials, sample code, and a complete reference to
the .Net Common Language Runtime. You need to familiarize yourself with all
of the concepts involved, and this is one of the best free resources you can
get!

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:OE*************@TK2MSFTNGP10.phx.gbl...
I am a beginner in ASP.NET and web programming in general.

I have seen some examples on the internet in which some text set by
server-side code is "embedded" as a placeholder directly into client-side
html text (in the .aspx file). The syntax in the html text is, for example
:-

<p>Some client-side text and <%=ServerText%></p>

Now in the code-behind module (eg. c#) you can declare a public string
variable named ServerText and assign it to anything you like in Page_Load
and it seems to substitute it into the html stream, eg.

public string ServerText;

private void Page_Load(...)
{
if (!IsPostBack)
{
ServerText = "some server text";
}
}

Lo and behold when the page is rendered my paragraph reads :
Some client-side text and some server text

My questions are :
- what is the proper name for this mechanism ?
- what actually happens at run-time ?
- can anyone point me to some documentation on it (msdn or otherwise) ?
- does the string variable in the code-behind module have to be public ?

Nov 18 '05 #2

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

Similar topics

8
3869
by: Randell D. | last post by:
I have just recompiled, upgraded to PHP 4.3.4. As an exercise (and curiosity) I've decided to test out PDF functions and got the test in the PHP online manual working. I had one problem whereby...
2
3051
by: thecrow | last post by:
Alright, what the hell is going on here? In the following code, I expect the printed result to be: DEBUG: frank's last name is burns. Instead, what I get is: DEBUG: frank's last name is...
220
18803
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
699
33322
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
9
2656
by: Martin Maney | last post by:
In my copious spare time I've been dabbling at getting a computerized version of a board game working. After deciding that tk just made me want to vomit, and wx was like swimming through...
92
6331
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption?...
3
2409
by: Ron_Adam | last post by:
Ok... it's works! :) So what do you think? Look at the last stacked example, it process the preprocess's first in forward order, then does the postprocess's in reverse order. Which might be...
12
11127
by: Dario | last post by:
The following simple program behaves differently in Windows and Linux . #include <stdexcept> #include <iostream> #include <string> using namespace std; class LogicError : public logic_error {...
30
15389
by: James Conrad StJohn Foreman | last post by:
After 3 years of using DB2 on Linux, I'm leaving my current employers to go work for a SQL Server shop instead. In order to find my replacement, they're trying to put together a set of questions...
2
1622
by: yogesh | last post by:
char TCGI::x2c(char *what) { register char digit; digit = (char) ((what >= 'A' ? ((what & 0xdf) - 'A')+10 : (what - '0'))); digit *= (char) 16; digit += (char) ((what >= 'A' ? ((what & 0xdf) -...
0
7198
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,...
0
7072
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
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
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
6979
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...
1
4998
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
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
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1498
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 ...

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.