From: Evertjan. on
Geo55 wrote on 01 mrt 2008 in microsoft.public.inetserver.asp.general:

> The situation :
> an ASP VBscript application on IIS 6 with (ado) connection to a
> database.
>
> When I had a record with text via an input object on a ASP page
> everything is OK and I see the new record (text) on an other page with
> a grid. The text is correctly stored in the database.
>
> Now the problem : If I use the sign > " < in a text (in a input
> object) and store it in the database It is also OK ..
> (it appair normaly on the page with a grid). It is also correctly
> stored in the database.
>
> But when I try to load this string again in a input object (to maken
> change) al the sign's after the " are disappeared. I just cann't find
> out why ?!
>
> All others sign's and letter's don't disappear..
> Any help is welcome..

Your sql string seems to end prematurely on a " in a string.
The quality of your code seems not the be adaequate.

However, without you showing any code, it is immpossible to say for sure.

Please show only the relevanrt code.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
From: Evertjan. on
Geo55 wrote on 02 mrt 2008 in microsoft.public.inetserver.asp.general:

> The " and all what follow it only disappear within a input object like
>: <input name="Taak" type="text" value="<% = rsEdit("Taak") %>
> " size="100" maxlength="100">
>

value = "<% = rsEdit("Taak") %>"

Always look at the view source!
ASP does not reach the client browser.

if the string put in the html stream
sent to the client by <% = rsEdit("Taak")%>
contains a " the view sours will show:

value = "Georges zei: "Goede morgen""

value would only get the string
contained within the first two "":

value = "Georges zei: "

Duidelijk?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
From: Dave Anderson on
"Geo55" wrote:
> Now the problem : If I use the sign > " < in a text (in a input
> object) and store it in the database It is also OK ..
> (it appair normaly on the page with a grid). It is also correctly
> stored in the database.
>
> But when I try to load this string again in a input object (to maken
> change) al the sign's after the " are disappeared. I just cann't find
> out why ?!

<input value="Server.HTMLEncode({your value})" ...>

http://msdn2.microsoft.com/en-us/library/ms525347.aspx



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

From: Evertjan. on
Geo55 wrote on 02 mrt 2008 in microsoft.public.inetserver.asp.general:

> Op 01 Mar 2008 23:25:17 GMT, schreef "Evertjan."
> <exjxw.hannivoort(a)interxnl.net> :
>
>>Geo55 wrote on 02 mrt 2008 in microsoft.public.inetserver.asp.general:
>>
>>> The " and all what follow it only disappear within a input object
like
>>>: <input name="Taak" type="text" value="<% = rsEdit("Taak") %>
>>> " size="100" maxlength="100">
>>>
>>
>>value = "<% = rsEdit("Taak") %>"
>>
>>Always look at the view source!
>>ASP does not reach the client browser.
>>
>>if the string put in the html stream
>>sent to the client by <% = rsEdit("Taak")%>
>>contains a " the view sours will show:
>>
>>value = "Georges zei: "Goede morgen""
>>
>>value would only get the string
>>contained within the first two "":
>>
>>value = "Georges zei: "
>>
>>Duidelijk?
>
> Bedankt voor je reactie. Daar had ik echt niet aan gedacht.
> Is er geen work around ?

Natuurlijk, als je ASP-vbs gebruikt:

value = "<% = replace(rsEdit("Taak"),"""","""""") %>"

die escape-t iedere " in de string naar ""

Maar er kan in de string ook een return zitten, die in html verkeerd
wordt gelezen, en dat zou je ook moeten "valideren".

Test dus alle mogelijkheden door steeds de view-source te bekijken.

==============

voor ASP-jscript:

value = "<% = rsEdit("Taak").replace(/"/g,'\\"') %>"


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 | 
Pages: 1
Prev: Shopping
Next: can aybody help?