Write to webpage from code behind

B

Ben

Hi

I have a string variable which is populated in the Page Load sub of my vb
code behind for my webpage.

I cannot seem seem to write this text to the webpage.

What is the best method of achiving this.

Thanks
B
 
K

Karl Seguin

Typically you put a literal on the webpage ala:
<asp:literal id="lit" runat="server" />

declare it in codebehind:

protected lit as Literal
Sub Page_Load(..)
lit.Text= "someValue"
end Sub

Karl
 
K

Kevin Spencer

Put a Label or Panel control on the page. Populate it with your string.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 

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

No members online now.

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top