Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Response.Write from a CodeBehind

Status
Not open for further replies.

yu217171

Programmer
Aug 2, 2002
203
CA
Hi everyone, I've divided my site into several tables.
How do I output text from my codebehind to a certain table or certain position in my HTML (without having the put ASP code within <% %> delimiters in my .ASPX?

Thanks in advance.

Keith
 
If you know your position of the HTML , you can place a Literal control there and set the value for that control. alternatively you can use a place holder control.
 
merlyn using response.write places the text at the very top of the page before the <HTML> tag This cause some ugly problems with alignment and such. I find that I never use the response.write command unless I throw it into a page to check a variable when I am debugging and don't want to step throught the code.

Instead if it is simply a message to the user I often use a label control and set the text of that label to the message.
As mentioned above a placeholder or literal control also works. Really depends on what exactly you were trying to response.Write out. Try different methods and choose the one you are most comfortable with.

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
np just thought I would verify

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top