473,327 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Usercontrol outputting html programmatically

Hi,

Could someone please explain to me the propper way of having a user
control spit out some html from code-behind (at the position it is
placed in the parent document)? I initially thought just
Response.Write, but I discovered that this dumps the output at the top
of the page regardless of the postition of the user control.

Do i need to add a placeholder or literal to the aspx view of the user
control (an then have the code behind write to this)? Should I be using
something other than Response.Write (HTMLWriter for instance)?

Any info appreciated!
Nov 19 '05 #1
1 1254
You would need to have some placeholder such as a <div>. You should then be
able to write whatever HTML you want at that position.

"Sosh123" <so**@so9sh.com> wrote in message
news:O#**************@TK2MSFTNGP09.phx.gbl...
Hi,

Could someone please explain to me the propper way of having a user
control spit out some html from code-behind (at the position it is
placed in the parent document)? I initially thought just
Response.Write, but I discovered that this dumps the output at the top
of the page regardless of the postition of the user control.

Do i need to add a placeholder or literal to the aspx view of the user
control (an then have the code behind write to this)? Should I be using
something other than Response.Write (HTMLWriter for instance)?

Any info appreciated!

Nov 19 '05 #2

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

Similar topics

3
by: Dave McCracken | last post by:
I am hosting .Net UserControls in HTML pages with Object Tags. These UserControls are clients of remotable objects that run on the same machine. The remote objects execute callbacks via sponsor...
2
by: bill yeager | last post by:
When trying to run my web project, I get the following error: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the...
2
by: Eric Maia | last post by:
I have two UserControls I am using in a form. These are each also used separately in two other forms. The structure is essentially this: CourseUserControl.ascx - select or enter a course...
2
by: Sascha | last post by:
Hi there, I searched carefully through the web before finally deciding to post this message, because I could not find a solution for my problem. Hopefully someone will have a hint or explanation...
2
by: Tim_Mac | last post by:
hi, i have an aspx page which dynamically loads a user control and adds it to a placeholder. the control is recreated and added to the placeholder for postbacks as well. the user control...
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
0
by: oliver | last post by:
QUESTION: How to access an object embedded in a UserControl through Javascript file? Another way to ask this question: How to execute script from a UserControl, accessing other objects in that...
2
by: sklett | last post by:
I'm trying to add an assembly that has a couple UserControls (among other things) to the toolbar. When I browse to it, I get a message that it's can't find an assembly that it needs...
1
by: Nathan Sokalski | last post by:
I have a UserControl that I declare programmatically as follows: Dim userctrl as New rightside_portal() The codebehind file for this UserControl looks like the following: Partial Public...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.