AutoComplete TextBox Control

前端 未结 9 1264
误落风尘
误落风尘 2020-11-27 04:48

I want to have a textbox control that suggests and append values from a database in a Windows application with C# 2008 and LINQ.

I do it with a combobox but I can\'t

9条回答
  •  执笔经年
    2020-11-27 05:41

        You can add a parameter in the query like @emailadd to be added in the aspx.cs file where the Stored Procedure is called with cmd.Parameter.AddWithValue.
        The trick is that the @emailadd parameter doesn't exist in the table design of the select query, but being added and inserted in the table.
    
        USE [DRDOULATINSTITUTE]
        GO
        /****** Object:  StoredProcedure [dbo].[ReikiInsertRow]    Script Date: 5/18/2016 11:12:33 AM ******/
        SET ANSI_NULLS ON
        GO
        SET QUOTED_IDENTIFIER ON
        GO
        ALTER procedure [dbo].[ReikiInsertRow]
        @Reiki varchar(100),
        @emailadd varchar(50)
        as
        insert into dbo.ReikiPowerDisplay
        select Reiki,ReikiDescription, @emailadd from ReikiPower
        where Reiki=@Reiki;
    
    Posted By: Aneel Goplani. CIS. 2002. USA
    

提交回复
热议问题