0
이 코드를 수정하는 데 도움을 줄 수 있습니까? 나는 다음과 같은 오류 받고 있어요 :그림을 업로드 할 때 CType NullReferenceException이 발생했습니다.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 21: 'Determine the maximum pictureID for this user
Line 22: Dim results As DataView = CType(maxPictureIDDataSource.Select(DataSourceSelectArguments.Empty), DataView)
Line 23: Dim pictureIDJustAdded As Integer = CType(results(0)(0), Integer)
Line 24: 'Reference the FileUpload control
Line 25: Dim imageUpload As FileUpload = CType(dvPictureInsert.FindControl("imageUpload"), FileUpload)
Source File: C:\Users\Collins\Documents\Visual Studio 2005\WebSites\living to please god world\PhotoAdmin\Default.aspx.vb Line: 23
을하고 빨간색 오류 선이 코드 줄에 :
Line 23: Dim pictureIDJustAdded As Integer = CType(results(0)(0), Integer)
사람은 내가보고 시작할 수있는 아이디어가 있습니까
?
안녕하세요 덕분에. 위의 코드를 삽입했다는 것을 보여줄 수 있습니까? 여기에 – onfire4JesusCollins
아래의 사진 업로드에 대한 전체 코드가 있습니다. 22 번째 줄 ('Dim pictureIDJustAdded As Integer'가 코드 조각에 포함되었습니다.)에서 23 번째 줄을 바꾸십시오. – Peladao