Write to webpage from code behind

  • Thread starter Thread starter Ben
  • Start date Start date
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
 
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
 
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.
 
Back
Top