Text in a Web Application
-
-
Hi. Does anybody know if it is possible to write programatically a text in a web application page with functionnalities like "newline", "tab", "center text",... In fact: organise a text programatically before putting it in a web page. Thanks, Oren :doh:
You can write text and format it with normal html controls. Then u can add this to one of the block-level element(
,
etc). Example: 1. Type the following script in notepad and save it in wwwroot folder with name such as "Test1.aspx" 2. Open Internet Explorer and the type URL: http://localhost/Test1.aspx
Sub Page\_Load(sender As Object,e As EventArgs) Dim str As String="<h1><center> Welcome To <b>Web<b/> <i>Appplication</i> </center></h1> in <br /> <h3>ASP.NET</h3>" div1.InnerHtml=str End Sub A Simple Test
I dont know wheather may reply solve ur problem. However i just tried.
-
You can write text and format it with normal html controls. Then u can add this to one of the block-level element(
,
etc). Example: 1. Type the following script in notepad and save it in wwwroot folder with name such as "Test1.aspx" 2. Open Internet Explorer and the type URL: http://localhost/Test1.aspx
Sub Page\_Load(sender As Object,e As EventArgs) Dim str As String="<h1><center> Welcome To <b>Web<b/> <i>Appplication</i> </center></h1> in <br /> <h3>ASP.NET</h3>" div1.InnerHtml=str End Sub A Simple Test
I dont know wheather may reply solve ur problem. However i just tried.
You can write text and format it with normal html controls. Then u can add this to one of the block-level element(
,
etc). Example: 1. Type the following script in notepad and save it in wwwroot folder with name such as "Test1.aspx" 2. Open Internet Explorer and the type URL: http://localhost/Test1.aspx
Sub Page\_Load(sender As Object,e As EventArgs) Dim str As String="<pre><h1><center> Welcome To <b>Web<b/> <i>Appplication</i> </center></h1> in <br /> <h3>ASP.NET</h3></pre>" div1.InnerHtml=str End Sub A Simple Test
-
Hi. Does anybody know if it is possible to write programatically a text in a web application page with functionnalities like "newline", "tab", "center text",... In fact: organise a text programatically before putting it in a web page. Thanks, Oren :doh:
You can write text and format it with normal html controls. Then u can add this to one of the block-level element(
,
etc). Example: 1. Type the following script in notepad and save it in wwwroot folder with name such as "Test1.aspx" 2. Open Internet Explorer and the type URL: http://localhost/Test1.aspx
Sub Page\_Load(sender As Object,e As EventArgs) Dim str As String=<pre>"<h1><center> Welcome To <b>Web<b/> <i>Appplication</i> </center></h1> in <br /> <h3>ASP.NET</h3>"</pre> div1.InnerHtml=str End Sub A Simple Test
-
Hi. Does anybody know if it is possible to write programatically a text in a web application page with functionnalities like "newline", "tab", "center text",... In fact: organise a text programatically before putting it in a web page. Thanks, Oren :doh:
sorry for inconvience. The browser is parsing data section. The contents of str varaible are as under:
Welcome To Web Appplication
===========================================
****in
ASP.NET****
-
Hi. Does anybody know if it is possible to write programatically a text in a web application page with functionnalities like "newline", "tab", "center text",... In fact: organise a text programatically before putting it in a web page. Thanks, Oren :doh:
You can use
StringBuilder
to build text before dumping on a label, literal or straightResponse.Write()
. Or you can look atHtmlTextWriter
which has some specific methods for HTML writing (obviously), though it doesn't facilitate newline or tab. -- modified at 10:47 Friday 28th July, 2006 I take that back,HtmlTextWriter
does handle indent and newline.
Try code model generation tools at BoneSoft.com.
-
You can use
StringBuilder
to build text before dumping on a label, literal or straightResponse.Write()
. Or you can look atHtmlTextWriter
which has some specific methods for HTML writing (obviously), though it doesn't facilitate newline or tab. -- modified at 10:47 Friday 28th July, 2006 I take that back,HtmlTextWriter
does handle indent and newline.
Try code model generation tools at BoneSoft.com.