Professional Web Applications Themes

passing arrays to asp - ASP.NET General

Is it possible to pass array toa client side script from server side? my code is something like: MyDropDownList.Attributes.Add("onChange", "MyFunc (aFrom,DropDownList2, this.value);") where aFrom is created in VB and it is two dimensional array. My script is function MyFunc(aFrom,Filter, strSeq) { .... }...

  1. #1

    Default passing arrays to asp

    Is it possible to pass array toa client side script from
    server side?

    my code is something like:
    MyDropDownList.Attributes.Add("onChange", "MyFunc
    (aFrom,DropDownList2, this.value);")
    where aFrom is created in VB and it is two dimensional
    array.
    My script is
    function MyFunc(aFrom,Filter, strSeq)
    {
    ....
    }



    ljilja Guest

  2. #2

    Default Re: passing arrays to asp

    "ljilja" <com> wrote in news:05bf01c36c9d$191d1ef0
    $gbl:
     

    No, but you can pass the array via cookies, querystring, or simply writing
    out the entire array to the webpage in the form of a javascript array.

    --
    Lucas Tam (com)
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
    Lucas Guest

  3. #3

    Default Re: passing arrays to asp

    It isn't possible to PASS an array to a client-side JavaScript function, but
    it is certainly possible to BUILD a client-side JavaScript array on the
    server. Since JavaScript is just text in the Page, you simply create the
    string that becomes an array on the client side, and use
    Page.RegisterClientScriptBlock to add it to the Page.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    The more I learn, the less I know.

    "ljilja" <com> wrote in message
    news:05bf01c36c9d$191d1ef0$gbl... 


    Kevin Guest

Similar Threads

  1. Passing CF Arrays to javascript
    By dxsmith99 in forum Macromedia ColdFusion
    Replies: 2
    Last Post: March 18th, 04:59 PM
  2. [PHP] more proplems with passing arrays
    By Jake in forum PHP Development
    Replies: 2
    Last Post: November 2nd, 09:59 PM
  3. Passing Arrays
    By David P. Jessup in forum ASP
    Replies: 3
    Last Post: September 30th, 07:42 PM
  4. Passing arrays through functions
    By Henry in forum ASP
    Replies: 3
    Last Post: September 15th, 02:44 PM
  5. Passing arrays to SP
    By Gary B in forum Microsoft SQL / MS SQL Server
    Replies: 3
    Last Post: July 10th, 05:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139