|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
is the value passed via HiddenField to client-side always string?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é *Everything* in an HTML document is text. So, yes, you do.
-- Show quoteHide quoteHTH, Kevin Spencer Microsoft MVP Professional Chicken Salad Alchemist I recycle. I send everything back to the planet it came from. "André" <sd***@sds.sdf> wrote in message news:e3xo2GikGHA.1272@TK2MSFTNGP03.phx.gbl... > 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é > > Thanks
Show quoteHide quote "Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message news:u7fIkdikGHA.1508@TK2MSFTNGP04.phx.gbl... > *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é" <sd***@sds.sdf> wrote in message > news:e3xo2GikGHA.1272@TK2MSFTNGP03.phx.gbl... > > 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é > > > > > >
how to get the text in JS of a cell created on server?
why does this not work? can get forecolor but not background color in Javascript Retrieving Asp.treeview checked checkbox information Uploading to a folder outside the www ... ? FormView/Repeater/ Eval(FormView data) questions about Controls.add HyperLink control vs. Firefox ASP.Menu in IE6, cannot select menu item when... multiple datagrids on same page paging broken |
|||||||||||||||||||||||