473,473 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

asp:placeholder - insert html after

I'm trying to create a Page class that I derive all others from. This page
class will look for an asp:placeholder and insert some html at that point.

I can see how I can create new HTML controls in code and then add them to
the placeholders Controls container. But is there any way I can use
Response.Write() to output some html directly before of after this
placeholder? What I was after is something like a InnerHtml method, but I
see nothing like this.

Any ideas?
Nov 18 '05 #1
2 4935
Brett,

You could do PlaceHolder1.Controls.Add(new LiteralControl("<div>" +
strWhatever + "</div>"));

Or

PlaceHolder1.Controls.AddAt(2,new LiteralControl("<div>" + strWhatever +
"</div>"));

Hope this helps...

Brian K. Williams

"Brett Robichaud" <br************@nospam.yahoo.com> wrote in message
news:uz***************@TK2MSFTNGP09.phx.gbl...
I'm trying to create a Page class that I derive all others from. This page class will look for an asp:placeholder and insert some html at that point.

I can see how I can create new HTML controls in code and then add them to
the placeholders Controls container. But is there any way I can use
Response.Write() to output some html directly before of after this
placeholder? What I was after is something like a InnerHtml method, but I
see nothing like this.

Any ideas?

Nov 18 '05 #2
Excellent. Just what I wanted. Thanks!

-Brett-

"Brian K. Williams" <wi*******@millenia.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Brett,

You could do PlaceHolder1.Controls.Add(new LiteralControl("<div>" +
strWhatever + "</div>"));

Or

PlaceHolder1.Controls.AddAt(2,new LiteralControl("<div>" + strWhatever +
"</div>"));

Hope this helps...

Brian K. Williams

"Brett Robichaud" <br************@nospam.yahoo.com> wrote in message
news:uz***************@TK2MSFTNGP09.phx.gbl...
I'm trying to create a Page class that I derive all others from. This

page
class will look for an asp:placeholder and insert some html at that point.
I can see how I can create new HTML controls in code and then add them to the placeholders Controls container. But is there any way I can use
Response.Write() to output some html directly before of after this
placeholder? What I was after is something like a InnerHtml method, but I see nothing like this.

Any ideas?


Nov 18 '05 #3

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

Similar topics

2
by: Stephen | last post by:
I want to create a data entry form consisting of X rows of HTML input fields. X = number of rows that the user will determine when the web page is running. I was able to use an asp:placeholder...
1
by: Dan | last post by:
I have an asp.net page default.aspx with a user control and a placeholder control. <html> <body> <form id="myform" method="post" runat="server" /> <PageHeader:Header id="header1"...
1
by: R.A.M. | last post by:
Hello, I need your help with a problem of menu definition. Plase help, I have little experience. I have created custom Menu, which I want to put on a few .aspx pages: public class DemoMenu :...
5
by: studio60podcast | last post by:
I have an ASP:Placeholder and I'm trying to populate with Label controls from the code behind after a button click, essentially creating a list of selections. But each time I click the button,...
1
by: =?Utf-8?B?c3Nhcjk=?= | last post by:
I have two folders in inetpub/wwroot. One has all HTML code, the other has HTML & ASP pages. The pure HTML files show up in IE6 just fine. The other pages just say done with a blank page. I had...
1
by: ckb | last post by:
Hi, This bit of code throws error Expected End of statement at line1 <asp:Table Width="100%" > <asp:TableRow id="T2r1"> <asp:TableCell id="T2r1c1" Width="85%"> <asp:PlaceHolder ID="PlaceHolder1"...
1
by: joecosmides | last post by:
I have a microsoft access front end and backend database for multi- user use. I have the back end located on a server that also is an IIS webserver. I've created a few ASP pages that pull customer...
2
by: joecosmides | last post by:
I have a microsoft access front end and backend database for multi- user use. I have the back end located on a server that also is an IIS webserver. I've created a few ASP pages that pull customer...
3
by: 200dogz | last post by:
In terms of disaplying text on the server side, which one is the better choice - an asp:Label or an asp:Placeholder? The only difference between the two that I know is that label puts a <span> tag...
0
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
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
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
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
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
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
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
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 ...
1
muto222
php
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.