Asp按钮事件不适用于微小的mce html编辑器?

时间:2014-05-01 12:30:51

标签: asp.net-mvc tinymce

我在我的asp.net网站上使用微小的mce html编辑器。我想在该页面上使用asp按钮在数据库中插入一些值,但asp按钮点击事件不起作用。我的意思是按钮上的回发是不工作 这低于我的.aspx文件代码..

<head runat="server">
<title></title>
<script src="Script/jquery.1.8.2.min.js"></script>
<script src="/tinymce/js/tinymce/tinymce.min.js"></script>
<link href="StyleSheet.css" rel="stylesheet" />
<%--<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>--%>

<script>
tinymce.init({
    selector: "textarea#<%=elm1.ClientID%>",
    theme: "modern",
    height: 300,

    plugins: [
         "advlist autolink link image lists charmap print preview hr anchor pagebreak          spellchecker","searchreplace wordcount visualblocks visualchars code fullscreen   insertdatetime media nonbreaking",
         "save table contextmenu directionality emoticons template paste textcolor"
    ],
    content_css: "css/content.css",
    toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter  alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons",
    style_formats: [
         { title: 'Bold text', inline: 'b' },
         { title: 'Red text', inline: 'span', styles: { color: '#ff0000' } },
         { title: 'Red header', block: 'h1', styles: { color: '#ff0000' } },
         { title: 'Example 1', inline: 'span', classes: 'example1' },
         { title: 'Example 2', inline: 'span', classes: 'example2' },
         { title: 'Table styles' },
         { title: 'Table row 1', selector: 'tr', classes: 'tablerow1' }
    ]
});
      </script>
      </head>
<body>
<form id="form1" runat="server">
<div>
    <asp:TextBox ID="elm1" runat="server" TextMode="MultiLine"></asp:TextBox>
    <h3 style="color:#565656; margin-left:540px;">Admin panel to upload content</h3>
  </div>
    <div style="height:400px; width:500px; background-color:#ffffff;margin-top: 50px;     margin:0 auto;box-shadow: 0px 10px 20px 3px #d3d3d3;">
         <asp:TextBox ID="title_A" runat="server" placeholder=" Enter Title" CssClass="Admin_dial"></asp:TextBox>
         <asp:TextBox ID="content_A" runat="server" placeholder=" Enter content" CssClass="Admin_dial"></asp:TextBox>
         <asp:TextBox ID="author_A" runat="server" placeholder=" Enter author name" CssClass="Admin_dial"></asp:TextBox>

        <asp:Button ID="UploadA_btn" runat="server" Text="Upload"   CssClass="Admin_upload_btn" OnClick="UploadA_btn_Click" />

    </div>
    <div style="height:50px;"></div>

    Here UploadA_btn_click event is not working.What i do to solve this problem?

1 个答案:

答案 0 :(得分:0)

尝试OnClientClick="return Upload_btn_Click()"

只需将UploadA_btn_Click添加到将生成

的按钮属性中的Click事件
 Protected Sub Upload_btn_Click_Click(sender As Object, e As EventArgs) Handles Upload_btn_Click.Click


 End Sub