Javascript 使用弹出窗口在单击事件时显示civilid正面和背面图像
我把代码放在下面。如果你有任何想法,请告诉我。我想要两张civilid的照片 当我点击事件时会显示背景图像。有人能解决我的问题吗 crm/DisplayCategoryPicture.aspx VB aspx:Javascript 使用弹出窗口在单击事件时显示civilid正面和背面图像,javascript,asp.net,vb.net,sql-server-2008,Javascript,Asp.net,Vb.net,Sql Server 2008,我把代码放在下面。如果你有任何想法,请告诉我。我想要两张civilid的照片 当我点击事件时会显示背景图像。有人能解决我的问题吗 crm/DisplayCategoryPicture.aspx VB aspx: C在哪里?问题是什么?你问是否有人可以解决你的问题,但你忘了提到问题是什么?问题是通过使用二进制写入只能获得一个图像。我希望在单击事件时获得两个图像。 Private Sub CusImgShow() Try Const SQL As String = "SEL
C在哪里?问题是什么?你问是否有人可以解决你的问题,但你忘了提到问题是什么?问题是通过使用二进制写入只能获得一个图像。我希望在单击事件时获得两个图像。
Private Sub CusImgShow()
Try
Const SQL As String = "SELECT Civilimg1,civilimg2 FROM [NewCus] WHERE [Cust_ID] = @Cust_ID2"
Dim myCommand As New SqlCommand(SQL, myConnection)
myCommand.Parameters.AddWithValue("@Cust_ID", Request.QueryString("Cust_ID"))
myConnection.Open()
Dim myReader As SqlDataReader = myCommand.ExecuteReader
If myReader.Read Then
Response.ContentType = "image/JPEG"
Response.BinaryWrite(myReader("Civilimg1"))
Response.ContentType = "image/JPEG"
Response.BinaryWrite(myReader("Civilimg2"))
End If
myReader.Close()
myConnection.Close()
Catch ex As Exception
'MsgBox(ex.Message)'
End Try
End Sub
<asp:Image ID="Image2" runat="server" Height ="40" Width ="60"
ImageUrl='<%# Eval(("Cust_ID"),"~/crm/DisplayCategoryPicture.aspx?Cust_ID={0}")%>'
onclick="CreatepopUp1(this.src);" />
var Popup;
function CreatepopUp1(url) {
Popup = window.open(url, "Popup", 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=120,height=250,left = 190,top = 262');
Popup.focus();
}