Skip to content

Instantly share code, notes, and snippets.

@kaushalparik27
kaushalparik27 / Default.aspx.cs
Created May 14, 2017 08:31
jQuery AutoComplete - Basic Configuration - 02
public partial class WebForm69 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
//-- actual webmethod that will fetch data from database based on what user typed
[WebMethod]
public static List<Employee> GetEmployeeData(string SearchParam)
{
@kaushalparik27
kaushalparik27 / Default.aspx
Created May 14, 2017 08:31
jQuery AutoComplete - Basic Configuration - 01
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="Content/themes/base/jquery-ui.min.css" rel="stylesheet" />
<link href="Content/themes/base/base.css" rel="stylesheet" />
<link href="Content/themes/base/autocomplete.css" rel="stylesheet" />
<script src="Scripts/jquery-1.12.4.min.js"></script>
<script src="Scripts/jquery-ui-1.12.1.min.js"></script>
@kaushalparik27
kaushalparik27 / Default.aspx.cs
Created May 14, 2017 08:29
Bootstrap AutoComplete - Basic Configuration - 02
public partial class WebForm68 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
//-- actual webmethod that will fetch data from database based on what user typed
[WebMethod]
public static string[] GetEmployeeData(string SearchParam)
@kaushalparik27
kaushalparik27 / Default.aspx
Created May 14, 2017 08:29
Bootstrap AutoComplete - Basic Configuration - 01
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.12.4.min.js"></script>
<link href="Content/bootstrap.min.css" rel="stylesheet" />
<link href="Content/bootstrap-theme.min.css" rel="stylesheet" />
<script src="Scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="http://cdn.rawgit.com/bassjobsen/Bootstrap-3-Typeahead/master/bootstrap3-typeahead.min.js"></script>
@kaushalparik27
kaushalparik27 / Default.aspx.cs
Created May 14, 2017 08:27
Chosen AutoComplete - Basic Configuration - 02
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDropdown();
}
}
//-- bind dropdown
private void BindDropdown()
@kaushalparik27
kaushalparik27 / Default.aspx
Created May 14, 2017 08:26
Chosen AutoComplete - Basic Configuration - 01
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="Content/chosen.min.css" rel="stylesheet" />
<script src="Scripts/jquery-1.12.4.min.js"></script>
<script src="Scripts/chosen.jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
@kaushalparik27
kaushalparik27 / WebForm1.aspx
Created May 14, 2017 07:59
Custom/Div Based Alert In ASP.NET
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" />