Generating HTML code

G

Guest

I’m using the usual VisualStudio setup. That is to have a “Code Behindâ€
(somename.aspx.vb) file with all the code and the actual HTML code
somename.aspx) separate. I like this setup, but now I want to generate some
text and HTML code output using VB code and I want it to be placed in the
<body> part of my somename.aspx. If I use the Response.Write() method the
text is put in the beginning of the file. How can I generate text and HTML
using code in the <body></body> part of the file without placing all my code
there?
 
E

Eliyahu Goldin

Put server controls of your choice in the HTML and access them from
code-behind.

Eliyahu
 
K

Kevin Spencer

How can I generate text and HTML
using code in the <body></body> part of the file without placing all my
code
there?

Okay, first let me point out that generating HTML is what ASP.Net does. And
that's pretty much it. Just like ASP, ASP.Net creates dynamic web pages.

Second, this question begs a requirement. What is your business requirement
that drives the decision to "generate text and HTML using code in the
<body></body> part of the file without placing all my code there?"

It seems to me that you are jumping the gun a bit here. Apparently you have
just started studying ASP.Net. From your second sentence, it seems that you
are still struggling with concepts like "Code Behind." I would recommend
that you try to get a better grasp of how ASP.Net works before trying to
write code with it. Check out the tutorials in the .Net SDK. ASP.Net is
powerful, object-oriented, and event-driven. It is almost nothing like ASP.
And you don't construct an ASP.Net app in any way like you construct an ASP
app.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top