|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to pass more than one value with client callback?I have to pass a lot of variables from vb.net to javascript using client callback. the problem is that there are single variables, but also arrays with differents indexes. I have two questions: 1) is this technology made for passing a lot of variables or in fact only for one? 2) does it exist a esier way to pass the values and to recover them in javascript? Thanks for advice. André So far i did this: Vb.net: Dim pcbez, uurbez, logonbez, tpebez, htoebez, hlokbez ret = recbezet & "," & recuur2 ' single variable pcbez = Join(pcbezet, ",") ' array index=10 uurbez = Join(uur, ",") ' array index=10 logonbez = Join(logon, ",") ' array index=10 tpebez = Join(tpe, ",") ' array index=10 htoebez = Join(htoe, ",") ' array index=5 hlokbez = Join(hlok, ",") ' array index=5 returnValue = ret & "," & pcbez & uurbez & logonbez & tpebez & htoebez & hlokbez Javascript function ReceiveServerData(rValue) { recbezet=rValue.substring(0,1) recuur2=rValue.substring(2,3) .... } You can only pass back one value, so concatenating them together and then
splitting them apart again on the other end is the standard solution. It looks like you're pretty much doing that already so I don't have any complaints. Here's an example I put together: http://SteveOrr.net/articles/WebChat.aspx Show quoteHide quote "André" <y**@dfd.az> wrote in message news:uK8NynhlGHA.3304@TK2MSFTNGP03.phx.gbl... > Hi, > > I have to pass a lot of variables from vb.net to javascript using client > callback. the problem is that there are single variables, but also arrays > with differents indexes. > I have two questions: > 1) is this technology made for passing a lot of variables or in fact only > for one? > 2) does it exist a esier way to pass the values and to recover them in > javascript? > Thanks for advice. > André > > So far i did this: > Vb.net: > Dim pcbez, uurbez, logonbez, tpebez, htoebez, hlokbez > ret = recbezet & "," & recuur2 ' single variable > pcbez = Join(pcbezet, ",") ' array index=10 > uurbez = Join(uur, ",") ' array index=10 > logonbez = Join(logon, ",") ' array index=10 > tpebez = Join(tpe, ",") ' array index=10 > htoebez = Join(htoe, ",") ' array index=5 > hlokbez = Join(hlok, ",") ' array index=5 > returnValue = ret & "," & pcbez & uurbez & logonbez & tpebez & htoebez & > hlokbez > > Javascript > function ReceiveServerData(rValue) > { > recbezet=rValue.substring(0,1) > recuur2=rValue.substring(2,3) > ... > } > > Thanks
Show quoteHide quote "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:eSKgaGllGHA.408@TK2MSFTNGP03.phx.gbl... > You can only pass back one value, so concatenating them together and then > splitting them apart again on the other end is the standard solution. It > looks like you're pretty much doing that already so I don't have any > complaints. > Here's an example I put together: > http://SteveOrr.net/articles/WebChat.aspx > > -- > I hope this helps, > Steve C. Orr, MCSD, MVP > http://SteveOrr.net > > > "André" <y**@dfd.az> wrote in message > news:uK8NynhlGHA.3304@TK2MSFTNGP03.phx.gbl... > > Hi, > > > > I have to pass a lot of variables from vb.net to javascript using client > > callback. the problem is that there are single variables, but also arrays > > with differents indexes. > > I have two questions: > > 1) is this technology made for passing a lot of variables or in fact only > > for one? > > 2) does it exist a esier way to pass the values and to recover them in > > javascript? > > Thanks for advice. > > André > > > > So far i did this: > > Vb.net: > > Dim pcbez, uurbez, logonbez, tpebez, htoebez, hlokbez > > ret = recbezet & "," & recuur2 ' single variable > > pcbez = Join(pcbezet, ",") ' array index=10 > > uurbez = Join(uur, ",") ' array index=10 > > logonbez = Join(logon, ",") ' array index=10 > > tpebez = Join(tpe, ",") ' array index=10 > > htoebez = Join(htoe, ",") ' array index=5 > > hlokbez = Join(hlok, ",") ' array index=5 > > returnValue = ret & "," & pcbez & uurbez & logonbez & tpebez & htoebez & > > hlokbez > > > > Javascript > > function ReceiveServerData(rValue) > > { > > recbezet=rValue.substring(0,1) > > recuur2=rValue.substring(2,3) > > ... > > } > > > > > >
Unicode API
How to assign a state to checkbox in Visual Basic.net ? putting a line on my form simple graphics question Reference to a control, by its name in a String Executing a stored procedure that uses linked server from vb.NET Visual Studio 2005 Pro Dragging a control WebControl scrolling LINQ feedback |
|||||||||||||||||||||||