string a = "1,3,5,";
        Response.Write(a.TrimEnd(','));