By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,436 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

System.Text.StringBuilder

P: n/a
I am using some code off the web that requires a string builder in a script
within a web page.

In order to get the script to work I need to include the relevant library in
the references section in the project.

However, if I include the System library, the application does not work. In
the help files the string builder class is meant to be in system.text but it
aint!!

What library should I include so that string builder is available

Thanks in advance
Jul 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Hp.

System.text

I hope this helps?

Cor

"hplloyd" <hp*****@discussions.microsoft.com>
I am using some code off the web that requires a string builder in a script
within a web page.

In order to get the script to work I need to include the relevant library
in
the references section in the project.

However, if I include the System library, the application does not work.
In
the help files the string builder class is meant to be in system.text but
it
aint!!

What library should I include so that string builder is available

Thanks in advance

Jul 21 '05 #2

P: n/a
There is no system.text library in the list when I add a reference to the
project

"Cor Ligthert" wrote:
Hp.

System.text

I hope this helps?

Cor

"hplloyd" <hp*****@discussions.microsoft.com>
I am using some code off the web that requires a string builder in a script
within a web page.

In order to get the script to work I need to include the relevant library
in
the references section in the project.

However, if I include the System library, the application does not work.
In
the help files the string builder class is meant to be in system.text but
it
aint!!

What library should I include so that string builder is available

Thanks in advance


Jul 21 '05 #3

P: n/a
Hp,

What kind of script are you talking about, serverside of clientside?

Cor
Jul 21 '05 #4

P: n/a
Cor et al,

It's actually my problem. Hp started this thread for me.

What I want to do is use the methodology provided in the following tutorial:
http://www.charon.co.uk/content.aspx...8&ArticleID=53 in order to
render compliant XHTML.

I've compiled the Components class, and added the ?serverside? script to my
webpage aspx file in Visual Studio. However, when I run Build I get the
following:

Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'StringWriter'
could not be found (are you missing a using directive or an assembly
reference?)

Source Error:

Line 17: {
Line 18: StringBuilder stringBuilder = new StringBuilder();
Line 19: StringWriter stringWriter = new StringWriter(stringBuilder);
Line 20: HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
Line 21: base.Render(htmlWriter);
Source File: http://localhost/EmployeeInfo2/EmployeeForm.aspx Line: 19

Thanks for your help,
Cormy

"Cor Ligthert" wrote:
Hp,

What kind of script are you talking about, serverside of clientside?

Cor

Jul 21 '05 #5

P: n/a
Cormy,

Can you add this in top of your page
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.IO" %>

I took the next error as well the rest you may do yourself.

I hope this helps?

Cor

"Cormy" <Co***@discussions.microsoft.com>
Cor et al,

It's actually my problem. Hp started this thread for me.

What I want to do is use the methodology provided in the following
tutorial:
http://www.charon.co.uk/content.aspx...8&ArticleID=53 in order
to
render compliant XHTML.

I've compiled the Components class, and added the ?serverside? script to
my
webpage aspx file in Visual Studio. However, when I run Build I get the
following:

Compilation Error
Description: An error occurred during the compilation of a resource
required
to service this request. Please review the following specific error
details
and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'StringWriter'
could not be found (are you missing a using directive or an assembly
reference?)

Source Error:

Line 17: {
Line 18: StringBuilder stringBuilder = new StringBuilder();
Line 19: StringWriter stringWriter = new StringWriter(stringBuilder);
Line 20: HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
Line 21: base.Render(htmlWriter);
Source File: http://localhost/EmployeeInfo2/EmployeeForm.aspx Line: 19

Thanks for your help,
Cormy

"Cor Ligthert" wrote:
Hp,

What kind of script are you talking about, serverside of clientside?

Cor

Jul 21 '05 #6

P: n/a
Thanks so much for this, Cor. It works beautifully.

Cormy

"Cor Ligthert" wrote:
Cormy,

Can you add this in top of your page
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.IO" %>

I took the next error as well the rest you may do yourself.

I hope this helps?

Cor

"Cormy" <Co***@discussions.microsoft.com>
Cor et al,

It's actually my problem. Hp started this thread for me.

What I want to do is use the methodology provided in the following
tutorial:
http://www.charon.co.uk/content.aspx...8&ArticleID=53 in order
to
render compliant XHTML.

I've compiled the Components class, and added the ?serverside? script to
my
webpage aspx file in Visual Studio. However, when I run Build I get the
following:

Compilation Error
Description: An error occurred during the compilation of a resource
required
to service this request. Please review the following specific error
details
and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'StringWriter'
could not be found (are you missing a using directive or an assembly
reference?)

Source Error:

Line 17: {
Line 18: StringBuilder stringBuilder = new StringBuilder();
Line 19: StringWriter stringWriter = new StringWriter(stringBuilder);
Line 20: HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
Line 21: base.Render(htmlWriter);
Source File: http://localhost/EmployeeInfo2/EmployeeForm.aspx Line: 19

Thanks for your help,
Cormy

"Cor Ligthert" wrote:
Hp,

What kind of script are you talking about, serverside of clientside?

Cor


Jul 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.