Mini Kabibi Habibi
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="indexContent" ContentPlaceHolderID="ContentHolder" runat="server">
<script type="text/javascript">
$(document).ready(function () {
$("#apply").click(function () {
$.ajax({
type: "POST",
url: '<%: Url.Action("CaptchaPartial", "Editors") %>',
data: {
characterSet: $("#CharacterSet").val(),
codeLength: $("#CodeLenght option:selected").text(),
isApplyOptions: true
},
success: function (response) {
$("#content").html(response);
}
});
})
});
</script>
<%
var options = Session["CaptchaOptions"] != null ? (CaptchaDemoOptions)Session["CaptchaOptions"] : CaptchaDemoOptions.Default;
%>
<% Html.BeginForm(); %>
<div style="padding-right: 25px; float:left;">
<div id="content">
<%
Html.RenderPartial("CaptchaPartial");
%>
</div>
<input type="submit" value="Submit" />
</div>
<div class="chartOptionsPanel horizOptionsPanel" style="float:left;">
<div>
<label for="CharacterSet">Character set:</label>
<%: Html.TextBox("CharacterSet", options.CharacterSet) %>
</div>
<div>
<label for="CodeLenght">Code lenght:</label>
<%: Html.DropDownList("CodeLenght", CaptchaDemoOptions.GetCodeLengthRange(options.CodeLength)) %>
</div>
<input id="apply" name="apply" type="button" value="Apply" />
</div>
<% Html.EndForm(); %>
</asp:Content>