비디오 업로드를위한 웹 응용 프로그램이 있습니다. 링크에서 비디오를 표시하고 싶습니다 .i는 video.i의 비디오 ID를 전달하는 함수를 작성했습니다. 함수로. 어떻게 할 수 있습니까? 어느 누구도 나를 도울 수 있습니까? 링크 클릭시 ID를 전달
이
내 코드 하나 (코드가 보인다 오히려 또는 버튼) 링크에 대한CommandArgument
을 설정하는 여러 가지 방법의
Private Function
GetSpecificVideo(ByVal i As Object) As
DataTable
'pass the id of the video
Dim connectionString As String =
ConfigurationManager.ConnectionStrings("UploadConnectionString")
.ConnectionString
Dim adapter As New SqlDataAdapter("SELECT FileName,
FileID,FilePath " + "FROM FileM WHERE
FileID = @FileID", connectionString)
adapter.SelectCommand.Parameters.Add("@FileID",
SqlDbType.Int).Value = DirectCast(i, Integer)
Dim table As New DataTable()
adapter.Fill(table)
Return table
End Function
Protected Sub ButtonShowVideo_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles ButtonShowVideo.Click
Repeater1.DataSource = GetSpecificVideo(****here i want to get the ID****)
'the video id (2 is example)
Repeater1.DataBind()
End Sub
하세요 html 또한 간단한 하이퍼 링크 또는'
TheVillageIdiot