Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Write html code inside asp.net (C#) (.cs) page

Tags:

html

asp.net

I would like to add some paragraphs or new lines or words dynamically but I want to make gaps between every part and the other. How is it possible to do that in the c# code page?

like image 237
Ahmad Farid Avatar asked Nov 22 '25 09:11

Ahmad Farid


1 Answers

You can use LiteralControl to add HTML tags like that :

Page.Controls.Add(new LiteralControl("<p>New<br />Line</p>"));
like image 111
Canavar Avatar answered Nov 23 '25 22:11

Canavar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!