Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > is the value passed via HiddenField to client-side always string?

Reply
Thread Tools

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

 
 
André
Guest
Posts: n/a
 
      06-17-2006
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").va lue

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

Thanks
André


 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      06-17-2006
*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.

"André" <> wrote in message
news:...
> 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").va lue
>
> Is this by default? Do i have to parseInt each value passed?
>
> Thanks
> André
>
>



 
Reply With Quote
 
 
 
 
André
Guest
Posts: n/a
 
      06-17-2006
Thanks

"Kevin Spencer" <> wrote in message
news:...
> *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.
>
> "André" <> wrote in message
> news:...
> > 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").va lue
> >
> > Is this by default? Do i have to parseInt each value passed?
> >
> > Thanks
> > André
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting HiddenField .Value Efi Merdler ASP .Net 8 05-04-2007 12:56 PM
Help getting at value of HiddenField in a UserControl (.Net 1.1) RSH ASP .Net 1 04-10-2007 09:55 PM
Need help getting the value in a HiddenField! Jeff ASP .Net 3 10-18-2006 04:25 PM
HiddenField value not valid sklett ASP .Net 3 10-13-2006 06:53 AM
is the value passed via HiddenField to client-side always string? André ASP .Net 2 06-17-2006 07:37 PM



Advertisments