Home
About
Contact
Categories
Classic ASP (26 - Sub-Categories)
JavaScript (4 - Sub-Categories)
Databases (21 - Sub-Categories)
ASP.NET (21 - Sub-Categories)
Delphi (5 - Sub-Categories)
Windows Server Core (3 - Sub-Categories)
VMWare (1 - Sub-Category)
Code Editing Tools (2 - Sub-Categories)
Linux (1 - Sub-Category)
Bug Reports
(Fugs Fixed
New CFFCS Coding Source is still in Beta
Please report any errors to the [Contact] page. Thank you.
Classic ASP (26)
JavaScript (4)
Databases (21)
ASP.NET (21)
Delphi (5)
Windows Server Core (3)
VMWare (1)
Code Editing Tools (2)
Linux (1)
Resources
[View The Source Code For This Project]
Format SQL Script
ASP.NET
C#
Bootstrap Tags Input (C# and SQL Server Database)
HTML
Bootstrap Tags Input by: cffcs.com
Type out any of the below tags to get their results, arrow down to select, and hit the [Enter] key.
Custom tags = Type a new word or phrase and hit the [Enter] key.
JavaScript
App.js
var citynames = new Bloodhound(
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'), queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch:
url: 'Tags.ashx', filter: function (list)
return $.map(list, function (cityname)
return
name: cityname
;
);
); citynames.initialize(); /** * Typeahead */ var elt = $('.example_typeahead > > input'); elt.tagsinput(
typeaheadjs:
name: 'citynames', displayKey: 'name', valueKey: 'name', source: citynames.ttAdapter()
); // HACK: overrule hardcoded display inline-block of typeahead.js $(".twitter-typeahead").css('display', 'inline');
SQL
Tags
-- Create a new database called [Virtual-Class-01] in SQL Server. -- Right-click and choose [New Query] -- Copy and paste the code below and hit [Execute] USE [Virtual-Class-01] GO /****** Object: Table [dbo].[Tags] Script Date: 8/15/2022 7:46:55 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Tags]( [TagID] [int] IDENTITY(1,1) NOT NULL, [TagName] [nvarchar](50) NOT NULL, CONSTRAINT [PK_Tags] PRIMARY KEY CLUSTERED ( [TagID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO SET IDENTITY_INSERT [dbo].[Tags] ON GO INSERT [dbo].[Tags] ([TagID], [TagName]) VALUES (1, N'Dallas') GO INSERT [dbo].[Tags] ([TagID], [TagName]) VALUES (2, N'Charlotte') GO INSERT [dbo].[Tags] ([TagID], [TagName]) VALUES (3, N'Raleigh') GO INSERT [dbo].[Tags] ([TagID], [TagName]) VALUES (4, N'Houston') GO INSERT [dbo].[Tags] ([TagID], [TagName]) VALUES (5, N'Washington') GO INSERT [dbo].[Tags] ([TagID], [TagName]) VALUES (6, N'New York') GO INSERT [dbo].[Tags] ([TagID], [TagName]) VALUES (7, N'Los Angeles') GO INSERT [dbo].[Tags] ([TagID], [TagName]) VALUES (8, N'Sydney') GO INSERT [dbo].[Tags] ([TagID], [TagName]) VALUES (9, N'Melbourne') GO SET IDENTITY_INSERT [dbo].[Tags] OFF GO
ASP.NET
web.config
database.config
Load.aspx.vb
Tags.ashx
using System.Data; using System.Configuration; using System.Data.SqlClient; protected void Page_Load(object sender, EventArgs e)
string LessonConString = ConfigurationManager.ConnectionStrings["Virtual-Learning"].ConnectionString; using (SqlConnection LessonCon = new SqlConnection(LessonConString))
using (SqlCommand cmd = new SqlCommand("select TagID, TagName from Tags", LessonCon))
LessonCon.Open(); SqlDataReader rsTag = cmd.ExecuteReader(); Context.Response.Write("
"); if (rsTag.Read())
while (rsTag.Read())
String strTag = (string)rsTag["TagName"]; Context.Response.Write("
" + strTag + "
");
Context.Response.Write("
"); LessonCon.Close();
using System.Data; using System.Data.SqlClient; using System.Configuration; using System.Collections.Generic; public void ProcessRequest(HttpContext context)
//List
names = new List
(); List
names = new List
(); string LessonConString = ConfigurationManager.ConnectionStrings["Virtual-Learning"].ConnectionString; using (SqlConnection LessonCon = new SqlConnection(LessonConString))
using (SqlCommand cmd = new SqlCommand("select TagID, TagName from Tags", LessonCon))
LessonCon.Open(); SqlDataReader sdr = cmd.ExecuteReader(); while (sdr.Read())
names.Add(sdr["TagName"].ToString());
LessonCon.Close();
context.Response.ContentType = "text/plain"; context.Response.Write(string.Format("[\"
0
\"]", string.Join("\",\"", names)));
Preview
Tags
ASP.NET C# Script
ASP.NET C# Version
Build our page for our Tags panel
Page_load - Load available records to display to our page