developer155
Programmer
Hello, I need a function that would encode a string to HTML friendly format, like this:
INPUT: "This is a string,this is a string"
OUTPUT "This+is+a+string%2C+this+is+a+string"
Server.HTMLEncode but it does nto work(it returns the same string, "This is a test". Is there an alternative?
here is my code
String TestString ="This is a string,this is a string";
StringWriter writer = new StringWriter();
Server.HtmlEncode(TestString, writer);
String EncodedString = writer.ToString();
RETURNS "This is a string,this is a string", so the same thing
thanks
INPUT: "This is a string,this is a string"
OUTPUT "This+is+a+string%2C+this+is+a+string"
Server.HTMLEncode but it does nto work(it returns the same string, "This is a test". Is there an alternative?
here is my code
String TestString ="This is a string,this is a string";
StringWriter writer = new StringWriter();
Server.HtmlEncode(TestString, writer);
String EncodedString = writer.ToString();
RETURNS "This is a string,this is a string", so the same thing
thanks