0
내 코드에서 WebMethod를 호출합니다. 해당 WebMethod 내에서 새 컨트롤 컬렉션을 만들 필요가 있습니다.WebMethod 내에서 CreateControlCollection() 사용
Dim cc As System.Web.UI.ControlCollection = CreateControlCollection()
을하지만이의 WebMethod 내부이기 때문에, 나는 오류 얻을 : VB에서 나는 일반적으로 작성합니다
Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class.
어떤 제안하세요? 감사합니다.
답장을 보내 주셔서 감사합니다.하지만 예 - 오류 메시지의 의미를 이해했습니다. 웹 메서드 내에서 [new] 명령을 사용할 수 없다는 문제는 을 반환합니다. Dim cc As New System.Web.UI.ControlCollection 액세스 할 수있는 'NEW'가이 인수의 수를 허용하지 않으므로 오버로드를 확인하지 못했습니다. – wotney