Posts

ASP.Net - Save Data in SQL Server Database with jQuery AJAX - C#

Enquiry.aspx <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="text/javascript" src="http://cdn.jsdelivr.net/json2/0.1/json2.js"></script> <script type="text/javascript">     $(function () {         $("[id*=btnSave]").bind("click", function () {             var user = {};             user.FullName = $("[id*=txtFullName]").val();             user.Address = $("[id*=txtAddress]").val();             user.City = $("[id*=txtCity]").val();             user.State = $("[id*=txtState]").val();             user.Locality = $("[id*=txtLocality]").val();     ...

JQuery - Export to Excel

<script type="text/javascript">     $(document).ready(function () {         $("#btnExport").click(function (e) {             window.open('data:application/vnd.ms-excel,' + $('#example').html());             e.preventDefault();         });     }); </script> <input type="button" id="btnExport" value=" Export Table data into Excel " />

JQuery - Calculation : + ADD - SUBSTRACT

<h2>* All prices are in $USD</h2> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script> <div name="stillrender" style="width:100%;border-bottom: 1px solid grey;float: left;margin-bottom: 2%;"> <h1>Still Renders</h1> <div class="quantity" style="float: left;"> <h2>Quantity</h2> <br> <input type="text" name="stillquantity" id="stillquantity"/> </div> <div class="quality" style="float: left; padding-left: 3%;"> <h2>Unit Price</h2> <span>$1500</span> </div> <div class="stilltottal" style="float: right;"> <h2>Total</h2> <br> <input name="stilltottal" id="stilltottal" /> </div> </div> <div name="animation" style="wid...

ASP.net - CheckListBox & JQuery Validation

     <asp:CheckBoxList ID="FamilyMemberCheckBoxList" runat="server" required = "required" ForeColor="Blue" Visible="false">      </asp:CheckBoxList> <script type="text/javascript">     function ValidateCheckBoxList(sender, args) {         var checkBoxList = document.getElementById("<%=FamilyMemberCheckBoxList.ClientID %>");         var checkboxes = checkBoxList.getElementsByTagName("input");         var isValid = false;         for (var i = 0; i < checkboxes.length; i++) {             if (checkboxes[i].checked) {                 isValid = true;                 break;             }         }         args.IsValid = isValid;     } </script>

SQL SERVER - DATA TYPES

Numeric Data Types Data Type Description Length int Stores integer values ranging from -2,147,483,648 to 2,147,483,647 4 bytes tinyint Stores integer values ranging from 0 to 255 1 byte smallint Stores integer values ranging from -32,768 to 32,767 2 bytes bigint Stores integer values ranging from -2 53  to 2 53 -1 8 bytes money Stores monetary values ranging from -922,337,203,685,477.5808 to 922,337,203,685,477.5807 8 bytes smallmoney Stores monetary values ranging from -214,748.3648 to 214,748.3647 4 bytes decimal(p,s) Stores decimal values of precision  p  and scale  s . The maximum precision is 38 digits 5–17 bytes numeric(p,s) Functionally equivalent to decimal 5–17 bytes float(n) Stores floating point values with precision of 7 digits (when  n =24) or 15 digits (when  n =53) 4 bytes (when  n =24) or 8 bytes (when  n =53) real Functionally equivalent to float(24) 4 bytes Date and Time Data Types Data Type Description Length Example date Stores...

ASP.net - GRIDVIEW with Button & HyperLink

Image
<!--EVENT GRID VIEW [START]--> <asp:GridView ID="gridView" DataKeyNames="SUBJECT_NAME" runat="server" AutoGenerateColumns="False" HeaderStyle-Font-Bold="true" BackColor="White"  BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" CellPadding="3"                                      onselectedindexchanged="gridView_SelectedIndexChanged"                                     CssClass="table table-hover table-bordered">                             <Columns>                                   <asp:BoundField DataField="SUBJECT_NAME"                          ...

ASP.net - Delete Image Photo From GridView

GridDemo.aspx <script type="text/javascript">     function deleteConfirm(pubid) {         var result = confirm('Do You Really Want to Delete Record : ' + pubid + ' ?');         if (result) {             return true;         }         else {             return false;         }     } </script> --------------------- <asp:GridView ID="gridView" DataKeyNames="GalleryId" runat="server"         AutoGenerateColumns="False" ShowFooter="True" HeaderStyle-Font-Bold="true"         onrowdeleting="gridView_RowDeleting"         OnRowDataBound="gridView_RowDataBound" BackColor="White" BorderColor="#3366CC"          BorderStyle="None" BorderWidth="1px" CellPadding="4"              onselectedind...