本文介绍了如何过滤pin码&带有自动完成文本框的区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何过滤pin码&带有自动填充文本框的区域带有唯一ID的其他文本框,自动完成文本框有pin码&在asp.net的区域





table #################### ###

how to filter pin code & area with Autocomplete Text box to others text box with unique id , auto complete text box have pin code & Area in asp.net


table#######################

CREATE TABLE [dbo].[tbl_report_particular](
	[Pin_code] [int] IDENTITY(1,1) NOT NULL,
	[area_name] [nvarchar](max) NULL,
	
GO



所选文字更改****** *********************************代码


selected text change ***************************************code

protected void txt_testname_TextChanged(object sender, EventArgs e)
   {
       try
       {
           SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["sql_date"].ConnectionString);
           con.Open();
           string query = "select_id";
           SqlCommand cmd = new SqlCommand(query, con);
           cmd.CommandType = CommandType.StoredProcedure;
           DataTable dt = new DataTable();
           SqlDataAdapter da = new SqlDataAdapter(cmd);
           da.Fill(dt);
           txt_testname.Text = dt.Rows[0]["Name_test"].ToString();
           txt_unit.Text = dt.Rows[0]["Id"].ToString();
           con.Close();

       }

       catch (Exception ex)
       {
           Response.Write(ex.Message);
       }
   }



商店程序代码****************** ********************************


store procedure code**************************************************

USE [test_dignostic]
GO
/****** Object:  StoredProcedure [dbo].[select_id]    Script Date: 09/03/2015 17:30:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[select_id]


AS
BEGIN

    -- Insert statements for procedure here
	SELECT Id, Name_test from tbl_report_particular
END

推荐答案


这篇关于如何过滤pin码&带有自动完成文本框的区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 15:35