473,554 Members | 5,044 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Insert text into an ASPx page

Hi
New to the .NET framework, but have been on 2124C, and have come back to
work to be asked to do ADO and ASPx (not covered in course!). The probelm i
am having is that I have created an ASPx page with some text in, and need to
add a block of text at a particular place from a database table (reading the
data I can do) - can anyone point me in the direction of some sample
code/examples on how to do this? The reason behind it is that mosst of the
text being used is generic, but particular apps have specific additional
text, and I want to find the best way to achieve this.
Thanks in advance
Martin
Jan 19 '06 #1
7 1759
if its plain text
u can display it in label

"Martin" <Ma****@discuss ions.microsoft. com> wrote in message
news:E1******** *************** ***********@mic rosoft.com...
Hi
New to the .NET framework, but have been on 2124C, and have come back to
work to be asked to do ADO and ASPx (not covered in course!). The probelm
i
am having is that I have created an ASPx page with some text in, and need
to
add a block of text at a particular place from a database table (reading
the
data I can do) - can anyone point me in the direction of some sample
code/examples on how to do this? The reason behind it is that mosst of
the
text being used is generic, but particular apps have specific additional
text, and I want to find the best way to achieve this.
Thanks in advance
Martin

Jan 19 '06 #2
Hi
I think it is plain text, and have been playing with literals - it seems to
display better irrespective of how much text is inserted. If I want to add
in HTML tagged text, what are my options?
Thanks
Martin

"Ankit Aneja" wrote:
if its plain text
u can display it in label

"Martin" <Ma****@discuss ions.microsoft. com> wrote in message
news:E1******** *************** ***********@mic rosoft.com...
Hi
New to the .NET framework, but have been on 2124C, and have come back to
work to be asked to do ADO and ASPx (not covered in course!). The probelm
i
am having is that I have created an ASPx page with some text in, and need
to
add a block of text at a particular place from a database table (reading
the
data I can do) - can anyone point me in the direction of some sample
code/examples on how to do this? The reason behind it is that mosst of
the
text being used is generic, but particular apps have specific additional
text, and I want to find the best way to achieve this.
Thanks in advance
Martin


Jan 19 '06 #3
You can put a Placeholder control situated in the exact place on the page
that you need. Then you can add controls to this after you get your data. It
could be an Generic control, label, Panel, whatever you need.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Martin" wrote:
Hi
New to the .NET framework, but have been on 2124C, and have come back to
work to be asked to do ADO and ASPx (not covered in course!). The probelm i
am having is that I have created an ASPx page with some text in, and need to
add a block of text at a particular place from a database table (reading the
data I can do) - can anyone point me in the direction of some sample
code/examples on how to do this? The reason behind it is that mosst of the
text being used is generic, but particular apps have specific additional
text, and I want to find the best way to achieve this.
Thanks in advance
Martin

Jan 19 '06 #4
Peter
OK - that sort of makes sense. So, how do you control a placeholder? Can
you turn on/off display?
Regards
Martin

"Peter Bromberg [C# MVP]" wrote:
You can put a Placeholder control situated in the exact place on the page
that you need. Then you can add controls to this after you get your data. It
could be an Generic control, label, Panel, whatever you need.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Martin" wrote:
Hi
New to the .NET framework, but have been on 2124C, and have come back to
work to be asked to do ADO and ASPx (not covered in course!). The probelm i
am having is that I have created an ASPx page with some text in, and need to
add a block of text at a particular place from a database table (reading the
data I can do) - can anyone point me in the direction of some sample
code/examples on how to do this? The reason behind it is that mosst of the
text being used is generic, but particular apps have specific additional
text, and I want to find the best way to achieve this.
Thanks in advance
Martin

Jan 19 '06 #5
=?Utf-8?B?TWFydGlu?= <Ma****@discuss ions.microsoft. com> wrote in
news:9F******** *************** ***********@mic rosoft.com:
I think it is plain text, and have been playing with literals - it
seems to display better irrespective of how much text is inserted. If
I want to add in HTML tagged text, what are my options?


Almost any HTML tag can be made accessible to the code-behind by adding a
tag 'runat=server' and 'id=<name>' as attributes. You can then access the
"inside" of the tag with <name>.innerHtm l. You could do this with a div or
a span or whatever suits your needs.

-mdb
Jan 19 '06 #6
Hi,

Just use a Label , also you could use a DIV and set the text in your code.

In reality there are multiple ways of doing it, it's a simple task

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Martin" <Ma****@discuss ions.microsoft. com> wrote in message
news:E1******** *************** ***********@mic rosoft.com...
Hi
New to the .NET framework, but have been on 2124C, and have come back to
work to be asked to do ADO and ASPx (not covered in course!). The probelm
i
am having is that I have created an ASPx page with some text in, and need
to
add a block of text at a particular place from a database table (reading
the
data I can do) - can anyone point me in the direction of some sample
code/examples on how to do this? The reason behind it is that mosst of
the
text being used is generic, but particular apps have specific additional
text, and I want to find the best way to achieve this.
Thanks in advance
Martin

Jan 19 '06 #7
Hi
Used the placeholder (as suggested) and the appropriate tags to sort it out
- once I'd looked at the hlp for Placeholder, it all made sense.
Thanks for your time
Martin

"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

Just use a Label , also you could use a DIV and set the text in your code.

In reality there are multiple ways of doing it, it's a simple task

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Martin" <Ma****@discuss ions.microsoft. com> wrote in message
news:E1******** *************** ***********@mic rosoft.com...
Hi
New to the .NET framework, but have been on 2124C, and have come back to
work to be asked to do ADO and ASPx (not covered in course!). The probelm
i
am having is that I have created an ASPx page with some text in, and need
to
add a block of text at a particular place from a database table (reading
the
data I can do) - can anyone point me in the direction of some sample
code/examples on how to do this? The reason behind it is that mosst of
the
text being used is generic, but particular apps have specific additional
text, and I want to find the best way to achieve this.
Thanks in advance
Martin


Jan 19 '06 #8

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

Similar topics

3
1658
by: | last post by:
I'm picking up an 'IMPORTS' error for a simple database insert based on two input entry boxes in my form? It says an 'Imports' statement must preceede any declarations....... is this perahps the '@' symbol?? Any help appreciated! Thanks Jason
7
3622
by: | last post by:
I am having trouble figuring out to call a database INSERT procedure from a simple submit form. It appears I should use the onclick event to trigger the procedure called BUT when I do this I receive this error: 'btnInsert_Click' is not a member of 'ASP.Insert_aspx'. I realise the procedure is houwsed in a sub which may be what is...
20
5606
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 client-side HTML, CSS, etc. What I want to do is somehow insert a *server control* into the , then set the server control's properties at runtime.
5
3444
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: default.aspx:
2
3353
by: =?Utf-8?B?UGhpbGlw?= | last post by:
I am attempting to insert a simple record with LinqDataSource from a ListView, however I always get a message saying "....LinqDataSource 'dataSource' has no values to insert. Check that the 'values' dictionary contains values...." I am using a ListView with a DataSourceID of a LinqDataSource. When a new row icon is clicked....the ListView...
0
7581
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...
0
7506
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7541
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
7872
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
6123
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...
1
5423
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5142
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
3545
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
1114
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.