private function  getGRSN()
dim theGRSN as integer
Randomize
theGRSN = CInt((9999999 * Rnd) + 1) reurn  "GRSN=" & CStr(theGRSN)
end function

解决方案 »

  1.   

    private function createRnd()
    dim retval as string
    retval = getGRSN() if retval.length > 4 then
    retval =retval.substing(0,4)
    end if return retval
    end function
      

  2.   

    private string getGRSN()
    {
        int theGRSN;
        Random R = new Random();
        m_theGRSN = R.Next(1,10000000);
        return "GRSN=" & theGRSN.ToString();
    }private string createRnd()
    {
        string retval;
        retval = getGRSN();    if (retval.Length > 4)
        {
             retval = retval.Substring(retval.Length -4);
        }
        return retval;
    }
    private string encode(string datastr, int bassnum) 
    {
    string tempstr;
    char tchar;
    string newdata = ""; for (int i = 0; i < datastr.Length; i++)
    {
    tchar = 65535 + bassnum - datastr.charCodeAt(i);    ???

    tchar = tchar.toString(); while(tchar.Length < 5)
    {
    tchar = "0" + tchar;
    } newdata = newdata + tchar;
    alert(newdata);    ???
    } return newdata;
    }
      

  3.   

    这个地方是JAVASCRIPT的写法,(datastr.charCodeAt(i); )ASPX。的写法应该怎样写呀,谢谢