Home
About
Contact
Categories
Classic ASP (28 - Sub-Categories)
CSS (1 - Sub-Category)
JavaScript (4 - Sub-Categories)
Databases (22 - Sub-Categories)
ASP.NET (23 - Sub-Categories)
Delphi (5 - Sub-Categories)
Windows Server Core (3 - Sub-Categories)
VMWare (1 - Sub-Category)
Code Editing Tools (2 - Sub-Categories)
Linux (2 - Sub-Categories)
Dell Servers (15 - Sub-Categories)
Bug Reports
(Bugs Fixed
New CFFCS Coding Source is still in Beta
Please report any errors to the [Contact] page. Thank you.
Classic ASP (28)
CSS (1)
JavaScript (4)
Databases (22)
ASP.NET (23)
Delphi (5)
Windows Server Core (3)
VMWare (1)
Code Editing Tools (2)
Linux (2)
Dell Servers (15)
Resources
[View The Source Code For This Project]
Format SQL Script
ASP.NET
VB.NET
Bootstrap Tags Input (VB.NET 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
Imports System.Data Imports System.Configuration Imports System.Data.SqlClient Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Dim LessonCon As New SqlConnection Dim LessonCMD As SqlCommand = Nothing LessonCon = New SqlConnection(ConfigurationManager.ConnectionStrings("Virtual-Learning").ConnectionString) LessonCon.Open() Dim getTag As New SqlCommand("select TagID, TagName from Tags", LessonCon) Dim rsTag As SqlDataReader rsTag = getTag.ExecuteReader() Context.Response.Write("
") If rsTag.Read() Then While rsTag.Read() Dim strTag As String = rsTag("TagName") Context.Response.Write("
" & strTag & "
") End While Else Context.Response.Write("No records found.") End If Context.Response.Write("
") LessonCon.Close() End Sub
Imports System Imports System.Web Imports System.Data Imports System.Configuration Imports System.Data.SqlClient Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Dim names As List(Of String) = New List(Of String)() Dim LessonconString As String = ConfigurationManager.ConnectionStrings("Virtual-Learning").ConnectionString Using LessonCon As SqlConnection = New SqlConnection(LessonconString) Using cmd As SqlCommand = New SqlCommand("select TagID, TagName from Tags", LessonCon) LessonCon.Open() Dim sdr As SqlDataReader = cmd.ExecuteReader() While sdr.Read() names.Add(sdr("TagName").ToString()) End While LessonCon.Close() End Using End Using context.Response.ContentType = "text/plain" context.Response.Write(String.Format("[""{0}""]", String.Join(""",""", names))) End Sub
Preview
Tags
ASP.NET VB Script
ASP.NET VB Version
Build our page for our Tags panel
Page_load - Load available records to display to our page