Truncation of Hidden text box values in Classic ASP - freakish.

R

Raga

Hi,

We have found a very freakish ‘truncate’ behavior in Classic ASP application
(that is called from within a web logic portal).

We have an ASP variable, lngOrderId (an oracle sequence number that right
now running in 8000+) in our ASP page.

The current value of this variable (got from the session) is 8095.

In order to pass the value to the next page, we set the variable’s value to
a Hidden INPUT field and pass it to the next form.
Here is the code snippet that does this task:
Response.Write "<!— Sample debug write " & lngOrderId & " -->"
strHTMLString = strHTMLString & "<input type=""hidden"" name=strOrdID
value=""" & lngOrderId & """>"
Response.Write strHTMLString

Now the first line correctly displays 8095 in the ViewSource.
But in the same view source I see that the above hidden variable (strOrdID)
has a value of 95 !

This happens only with particular variable and does not affect the other
variables.
We are unable to reason out why this is happening and it looks very very
freakish.

One weirdness in this scenario is – the ASP application is called from
within a weblogic portal.

Could this be a bug in ASP? Any ideas?

Thanks,
Raga
 
A

Adrienne Boswell

Gazing into my crystal ball I observed =?Utf-8?B?UmFnYQ==?=
In order to pass the value to the next page, we set the variableƒ Ts
value to a Hidden INPUT field and pass it to the next form.
Here is the code snippet that does this task:
Response.Write "<!ƒ " Sample debug write " & lngOrderId & " -->"
strHTMLString = strHTMLString & "<input type=""hidden"" name=strOrdID
value=""" & lngOrderId & """>"
Response.Write strHTMLString

What happens if you completely drop out of ASP, and do:
%>
<pre>
&lt;!-- Sample debug write <%=lngOrderId%> --%gt;
&lt;input type="text" name="strOrdId" value="<%=strOrdID%>"&gt;
</pre>
My news reader is inserting some strange looking characters, and I don't
know if they might be affecting what you are trying to do. See if the
same happens when you do the above. Further, if you use type="text"
whilst testing, you can see it right away without viewing source.
 
M

Marc

Raga said:
Hi,

We have found a very freakish 'truncate' behavior in Classic ASP
application
(that is called from within a web logic portal).

We have an ASP variable, lngOrderId (an oracle sequence number that right
now running in 8000+) in our ASP page.

The current value of this variable (got from the session) is 8095.

In order to pass the value to the next page, we set the variable's value
to
a Hidden INPUT field and pass it to the next form.
Here is the code snippet that does this task:
Response.Write "<!- Sample debug write " & lngOrderId & " -->"
strHTMLString = strHTMLString & "<input type=""hidden"" name=strOrdID
value=""" & lngOrderId & """>"
Response.Write strHTMLString

Now the first line correctly displays 8095 in the ViewSource.
But in the same view source I see that the above hidden variable
(strOrdID)
has a value of 95 !

This happens only with particular variable and does not affect the other
variables.
We are unable to reason out why this is happening and it looks very very
freakish.

One weirdness in this scenario is - the ASP application is called from
within a weblogic portal.

Could this be a bug in ASP? Any ideas?

Thanks,
Raga

Perhaps Oracle is spitting out unwanted characters like null, carriage
return or a line feed...
maybe try IsNumeric... and the suggestion Adrienne made about changing
'hidden' to 'text' should give you some insight as well
 
R

Raga

Thanks for responses Adrienne and Marc.

We finally found the real problem. It was an issue in the Proxy code - that
was stripping off values from textboxes that were submitted.

thanks,
Raga
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top