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

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

am 30.03.2007 23:42:00 von 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 ""
strHTMLString = strHTMLString & " 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

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

am 31.03.2007 09:34:32 von Adrienne Boswell

Gazing into my crystal ball I observed =?Utf-8?B?UmFnYQ==?=
writing in
news:BA1B10AD-532E-4F1E-9856-B67CE36ACF9F@microsoft.com:

> 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 ""
> strHTMLString = strHTMLString & " > value=""" & lngOrderId & """>"
> Response.Write strHTMLString
>

What happens if you completely drop out of ASP, and do:
%>


<!-- Sample debug write <%=lngOrderId%> --%gt;
<input type="text" name="strOrdId" value="<%=strOrdID%>">

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.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

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

am 01.04.2007 11:35:19 von marc

"Raga" wrote in message
news:BA1B10AD-532E-4F1E-9856-B67CE36ACF9F@microsoft.com...
> 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 ""
> strHTMLString = strHTMLString & " > 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

Re: Truncation of Hidden text box values in Classic ASP - freakish

am 07.04.2007 14:34:00 von 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

"Adrienne Boswell" wrote:

> Gazing into my crystal ball I observed =?Utf-8?B?UmFnYQ==?=
> writing in
> news:BA1B10AD-532E-4F1E-9856-B67CE36ACF9F@microsoft.com:
>
> > 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 ""
> > strHTMLString = strHTMLString & " > > value=""" & lngOrderId & """>"
> > Response.Write strHTMLString
> >
>
> What happens if you completely drop out of ASP, and do:
> %>
>


>