asp 摄像头编程技术应用
代码:
<%@ LANGUAGE=VBScript CodePage=65001%>
<%
private function decodeBase64(base64)
dim DM, EL
Set DM = CreateObject("Microsoft.XMLDOM")
Set EL = DM.createElement("tmp")
EL.DataType = "bin.base64"
EL.Text = base64
decodeBase64 = EL.NodeTypedValue
end function
dim data
data=decodeBase64(request.Form("pic_data"))
set stm=Server.CreateObject("ADODB.Stream")
'stm.Mode=adSaveCreateOverWrite 'adModeReadWrite
stm.type=1
stm.open
stm.Write(data)
stm.SaveToFile Server.MapPath("./") & "/" & request.Form("desc") & ".jpg",2
stm.Close
set stm=nothing
response.write "<img src='" & request.Form("desc") & ".jpg" & "'/>"
response.write "desc:" & request.Form("desc")
response.end
%>
华丽的分割线以下为前台操作摄像头拍照的html页面源代码
---------------------------------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>video cap control demo</title>
<script type="text/javascript" src="./js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="test1.js"></script>
</head>
<body>
<form action="test1.asp" id="cap_form" method="post">
<input type="hidden" id="picData" name="picData">
<object classid="clsid:34681DB3-58E6-4512-86F2-9477F1A9F3D8"
id="WebVideoCap1" codebase="./cabs/Package.cab#version=1,0,0,50" width="636" height="238">
<param name="Visible" value="0">
<param name="AutoScroll" value="0">
<param name="AutoSize" value="0">
<param name="AxBorderStyle" value="1">
<param name="Caption
相关文档:
目前,最常用的三种动态网页语言有ASP(Active Server Pages),JSP(Java Server Pages),
PHP (Hypertext Preprocessor)。
简 介
ASP全名Active Server & ......
<%
Const New_img=10
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top " & New_img & " * from 0791idc_Product order by ID"
rs_Product.open sqltext,conn,1,1
if not rs_Product.EOF then%>
<div align='center' id='demo' style='o ......
<%
for i=1 to rs.recordCount '变量i从1循环到数据库中的全部记录数
if (i mod 1 =1) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "<tr align='center'>"
end if
%>
此处为要循环的内容
<%if (i mod 1 = 0) then ......
1。深层次来说这不是asp.net 的问题,而是html form 的submit 按钮就是如何设计。
当你的光标焦点进入某个表单元素的时候,会激活该表单的第一个(
流布局顺从左到右,从上至下)
type=submit 的按钮(假如有),等待响应回车事件,并提交该form
你可以测试一下代码
<form action="">
<input type ="t ......
Dim FilePath,FileName
Set ObjFileStream = Server.CreateObject("ADODB.Stream")
ObjFileStream.Type = 1
ObjFileStream.Mode = 3
ObjFileStream.open
ObjFileStream.LoadfromFile FilePath&"\"&FileName&".doc"
ObjFileStream.Position = 0
response.binarywrite  ......