Expand|Select|Wrap|Line Numbers
- Public con1 As New SqlConnection("Data Source=ashii\sqlexpress;Initial Catalog=testing;Integrated Security=SSPI")
- con1.Open()
- Dim cmd As New SqlCommand("select max(pid) from photo ", con1)
- Dim k As New Integer
- k = cmd.ExecuteScalar
- Dim cmd1 As New SqlCommand("select photo from photo where pid='" & k & "'", con1)
- Dim p As String
- p = cmd1.ExecuteScalar().ToString
- Image1.ImageUrl = HttpContext.Current.Request.PhysicalApplicationPath + "picture\" + p.ToString