<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="File_Edit.aspx.cs" Inherits="Vote.Admin.File_Edit" %>
<!doctype html>
<html>
<head runat="server">
    <title>文件在线编辑器</title>
    <link href="codemirror/lib/codemirror.css" rel="stylesheet" type="text/css" />
    <script src="codemirror/lib/codemirror.js" type="text/javascript"></script> 
    <script src="codemirror/mode/css/css.js" type="text/javascript"></script> 
    <script src="codemirror/mode/javascript/javascript.js" type="text/javascript"></script>
</head>
<body style=" background:#000000">
    <form id="form1" runat="server">
    <div> 
    
    
    <textarea id="code" name="code"  > 
    <asp:Literal runat="server" ID="lt"></asp:Literal>
                    </textarea>



       


       
   <script>
       editor = CodeMirror.fromTextArea(document.getElementById("code"), {
           lineNumbers: true
       });

       function getvalue() {
           document.getElementById("hf_value").value = editor.getValue();

       }

    </script>
    


    <asp:HiddenField runat="server" ID="hf_value" ClientIDMode="Static"  />

    <div  style="  width:800px; text-align:center; margin:10px;">
    <asp:Button ID="btn_save" runat="server" OnClientClick="getvalue();" onclick="btnsave_Click" Text="保存" />
    <input type="button" onclick="window.close();" value="关闭" /> 
    </div>
    </div>
    </form>
</body>
</html>
