Skip to content

Instantly share code, notes, and snippets.

var buttonConfirmed = false;
$(function(){
$("[data-confirm]")
.each(function () {
var $btn = $(this)
.click(function(e) {
var btn = this;
if (buttonConfirmed) {
buttonConfirmed = false;
return true;
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="do-after-load.ascx.cs" Inherits="controls.DoAfterLoad" %>
<asp:UpdatePanel runat="server" UpdateMode="Always">
<ContentTemplate>
<asp:HiddenField runat="server" ID="DoAfterLoadJavaScriptHiddenField" />
</ContentTemplate>
</asp:UpdatePanel>
@malbert69
malbert69 / gist:71df9012c0df512287fa
Created October 3, 2015 20:37
Data-bound Literal Control
<asp:Literal runat="server" Text='<%#Eval("sub_total", "{0:f2}")%>'></asp:Literal>
@malbert69
malbert69 / gist:b136ff34ca6a3f3ff035
Created October 3, 2015 20:29
Proper ASP.NET Label Implementation
<asp:Label runat="server" AssociatedControlID="userName">User Name</asp:Label>
<asp:TextBox runat="server" ID="userName"></asp:TextBox>