Re: Display same contact list for all users

  •  07-31-2007, 3:28 PM

    Re: Display same contact list for all users

    Thanks for your last post. I should not have overlooked the quote marks myself...


    I'm trying to put this in the IM_MainForm.aspx as a test, and it produces an error. Suggestions?

    <script runat="server">
        string[] ContactsArray = { "Mike", "Scott", "John" };
        string nameString = String.Join(";", ContactsArray);
    </script>
    <script>
         var js_nameString = "<%= nameString %>";
         var my_array=js_nameString.split(";");
    </script>

    Error:

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0236: A field initializer cannot reference the nonstatic field, method, or property 'ASP.cutesoft_client_cutechat_im_mainform_aspx.ContactsArray'

    Source Error:


    Line 4:  <script runat="server">
    Line 5: string[] ContactsArray = { "Mike", "Scott", "John" };
    Line 6: string nameString = String.Join(";", ContactsArray);
    Line 7: </script>
    Line 8: <script>

    Source File: c:\JMDev\vRIS\CuteSoft_Client\CuteChat\IM_MainForm.aspx    Line: 6




View Complete Thread