473,507 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I insert text at runtime (but not in codebehind)

I need to place a piece of text into a page but the specific text is not
known at the time of the build. How can the webmaster define a string that
gets inserted into the page ** without modifying the aspx page **. I'm
thinking along the lines of a .txt file or something that can be
"#included". The text wouldn't change (hardly ever) once it is defined by
the webmaster. Sorry if this is a dumb question.

Thanks!

-- Alan
Nov 18 '05 #1
4 1013
You can sotre the text anywhere you like - File, Database, System Registry,
to name just a few persistent mediums. However, using a server-siode include
is generally not a good OOP practice to use. Try using a Label or
PlaceHolder instead.

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

"Alan Pretre" <no@spam> wrote in message
news:#E*************@TK2MSFTNGP10.phx.gbl...
I need to place a piece of text into a page but the specific text is not
known at the time of the build. How can the webmaster define a string that gets inserted into the page ** without modifying the aspx page **. I'm
thinking along the lines of a .txt file or something that can be
"#included". The text wouldn't change (hardly ever) once it is defined by
the webmaster. Sorry if this is a dumb question.

Thanks!

-- Alan

Nov 18 '05 #2
"Kevin Spencer" <ke***@takempis.com> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
You can sotre the text anywhere you like - File, Database, System Registry, to name just a few persistent mediums. However, using a server-siode include is generally not a good OOP practice to use. Try using a Label or
PlaceHolder instead.


Thanks. That's what I'm getting at. How can I put it in a text file or
something on the site and have the label fetch it in? My only requirement
is that the text not reside in the aspx page.

-- Alan
Nov 18 '05 #3
Never mind I'll put it in web.config.

Thanks.

-- Alan
Nov 18 '05 #4
You put a label in the page. In the Page_Load event handler you assign the
Text property of the label from your source.

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

"Alan Pretre" <no@spam> wrote in message
news:ue**************@TK2MSFTNGP09.phx.gbl...
"Kevin Spencer" <ke***@takempis.com> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
You can sotre the text anywhere you like - File, Database, System

Registry,
to name just a few persistent mediums. However, using a server-siode

include
is generally not a good OOP practice to use. Try using a Label or
PlaceHolder instead.


Thanks. That's what I'm getting at. How can I put it in a text file or
something on the site and have the label fetch it in? My only requirement
is that the text not reside in the aspx page.

-- Alan

Nov 18 '05 #5

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

Similar topics

3
2448
by: Rameshika | last post by:
Hi All How can I select a particular row in a datagrid.Where when the user double clicks the data in that row should appear in the corresponding text boxes in runtime And how can the user...
11
22983
by: Chris Fink | last post by:
I have setup an Oracle table which contains a blob field. How do I insert data into this field using C# and ADO.net?
8
34551
by: Subra Mallampalli | last post by:
Hi, I am trying to use <runtime> section within the web.config file. However, the contents of the <runtime> section seem to be ignored. What am i missing here? Is <runtime> section not used by...
20
5594
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
3
23668
by: Sirisha | last post by:
Hi, I am inserting values into databse using sqlserver stored procedures. i wrote stored preocedure,but in codebehind file(.vb file) i dont know how to pass the parameters, i got error message...
0
1849
by: Sirisha | last post by:
Hi, I am inserting values into databse using sqlserver stored procedures. i wrote stored preocedure,but in codebehind file(.vb file) i dont know how to pass the parameters, i got error message...
5
3440
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration:...
0
7223
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
7111
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
7319
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
7376
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
7031
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
5623
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,...
1
5042
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
1542
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
412
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.