<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="zcapp.aspx.cs" Inherits="Web.zcapp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>2-dimensional bar code</title>
    <script type="text/javascript" src="Js/jQuery.js" ></script>
    <script type="text/javascript" src="Js/validate.js" charset="utf-8"></script>
    <script type="text/javascript"> 
    function copy_code(copyText) 
    { 
        if (window.clipboardData) 
        { 
            window.clipboardData.setData("Text", copyText);
            alert('复制成功！'); 
        } 
        else 
        { 
//            var flashcopier = 'flashcopier'; 
//            if(!document.getElementById(flashcopier)) 
//            { 
//                var divholder = document.createElement('div'); 
//                divholder.id = flashcopier; 
//                document.body.appendChild(divholder); 
//            } 
//            document.getElementById(flashcopier).innerHTML = ''; 
//            var divinfo = '<embed src="_clipboard.swf" FlashVars="clipboard='+encodeURIComponent(copyText)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>'; 
//            document.getElementById(flashcopier).innerHTML = divinfo; 
            alert('复制失败，请使用IE浏览器或鼠标右键保存图片。'); 
        } 
        
    } 
    function checkTxt()
    {
        //验证
        return checkAllValidate();
    }
            
    </script> 
</head>
<body>
    <form id="form1" runat="server">
    <div>
        藏品ID：<asp:TextBox ID="TextBox1" runat="server" MaxLength="10" notNull="true" msgName="藏品ID" dataType="integer" maxValue="999999999" minValue="0"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="获取二维码图片" OnClientClick="return checkTxt()" onclick="Button1_Click" /><asp:Label ID="Label1" runat="server" Text="" Visible="false"></asp:Label>
        <br />
        <asp:Repeater ID="Repeater1" runat="server">
        <HeaderTemplate><ul></HeaderTemplate>
        <ItemTemplate>
        <li class="li<%# Container.ItemIndex + 1 %>">
        <img alt="" src="<%# Eval("EWMURL")%>" /> <input id="inputTest" type="button" value="复制图片链接" onclick="copy_code('<%# Eval("EWMURL")%>')" />
        </li>
        </ItemTemplate>
        <FooterTemplate></ul></FooterTemplate>
        </asp:Repeater>
    </div>
    </form>
</body>
</html>
