is the value passed via HiddenField to client-side always string?

A

André

Hi,

I want to pass a integer value to client-side via a hiddenfield created in
the aspx (HiddenField1)

dim myvalue as integer
myvalue=5
HiddenField1=myvalue

When fetching in Javascript, the value is of type string.
var myvalue=document.getElementById("HiddenField5").value

Is this by default? Do i have to parseInt each value passed?

Thanks
André
 
K

Kevin Spencer

*Everything* in an HTML document is text. So, yes, you do.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.
 
A

André

Thanks

Kevin Spencer said:
*Everything* in an HTML document is text. So, yes, you do.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.
 

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

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top