Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open a file and write contents to a DIV, span, label, some kind of container

Tags:

html

c#

asp.net

I’d like to be able to open a text/html file and write its contents to a container, either an HTML div or an asp label would be fine. How do I go about doing this in the C# codefile for the page in question?

like image 686
aggitan Avatar asked Oct 15 '22 17:10

aggitan


1 Answers

You just want to stream in the file and place the text into the Label.text field:

lable1.text= System.IO.File.ReadAllText( path );
like image 179
Glennular Avatar answered Oct 21 '22 12:10

Glennular