| Author |
is displayed when returned from database call
|
|
| koldskaal 2006-02-05, 9:23 am |
| I am making a web Application, where non breakable space ( ) is
crucial to the layout. When I write directly into the html, it
is displayed correctly. But If I store a value in the database (MS Sql
server 2003) containing the code it is rendered to the browser
like this:
King Kong
instead of
King Kong
Any solutions????
| |
|
| Yes, formatting shouldn=B4t be stored in the database unless you have to
use this in any way. I suggest formatting your text on the client side
not storing in in the server. Anyway, did you look at your HTML Code
which is rendered ? Perhap syou use a special control which does the
formatting for you, so that will be HTML coded as int
the client code.
HTH, Jens Suessmeyer.
| |
| Dan Guzman 2006-02-05, 11:23 am |
| To add to Jens' response, this is not a SQL Server issue because SQL Server
treats the data as a simple character string. The altering of the embedded
html codes occurs somewhere in your client code or components.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"koldskaal" <bjarkeriis@gmail.com> wrote in message
news:1139151007.170882.40360@g43g2000cwa.googlegroups.com...
>I am making a web Application, where non breakable space ( ) is
> crucial to the layout. When I write directly into the html, it
> is displayed correctly. But If I store a value in the database (MS Sql
> server 2003) containing the code it is rendered to the browser
> like this:
>
> King Kong
>
> instead of
>
> King Kong
>
> Any solutions????
>
| |
| koldskaal 2006-02-05, 1:23 pm |
| thanks Guys!
yes the hml code formats the retrieved string as KING KONG. I
will try to make a serverside function that exchanges all spaces in the
string with =20
I=B4ll let you know the result in 2 minnutes
| |
| koldskaal 2006-02-05, 1:23 pm |
| it worked!
it was quite easy
public static string unbreakSpaces(string
oldstring)
{
return oldstring.Replace(" ", " ");
}
|
|
|
|