Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="nav pull-right checkbox navbar-btn">
- @Html.CheckBox("ShowInactive", false) Show Inactive
- </div>
- <script type="text/javascript">
- $(document).ready(function () {
- $("#ShowInactive").prop("checked", @HttpContext.Current.Application["ShowInactive"]);
- $("#ShowInactive").click(function () {
- if (this.checked) {
- @HttpContext.Current.Application["ShowInactive"] = true;
- }
- else
- {
- @HttpContext.Current.Application["ShowInactive"] = false;
- }
- //This is to make the grid reload after the checkbox is changed.
- location.reload();
- });
- });
- </script>
- public static class GlobalVariables
- {
- public static bool ShowInactive
- {
- get { return (bool)HttpContext.Current.Application["ShowInactive"]; }
- set { HttpContext.Current.Application["ShowInactive"] = value; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement