Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to implement auto complete textbox in asp.net from mysql database. From this link http://www.aspdotnet-suresh.com/2015/05/jquery-autocomplete-textbox-example-in-master-using-webservice-in-aspnet.html[^] I successfully implemented from SQL SERVER, but while using MYSQL Database i cant get value from database.So please help me to implement auto complete textbox from MYSQL Database.
Posted

1 solution

While using MySql database you will have to change the connection with the help of MySQLConnector.

Your jquery code will still remain the same, just the connection string and code behind will change.

MySql Connection String

Below is the connection string to the MySql Database.

HTML
<connectionstrings>
    <add name="constr" connectionstring="Data Source=localhost;port=3306;Initial Catalog=SampleDB;User Id=abc;password=pass@123" />
</connectionstrings>


Namespaces

You will need to import the following namespaces.

C#
using System.Data;
using System.Configuration;
using MySql.Data.MySqlClient;



Please refer here for full details: http://www.aspsnippets.com/Articles/Use-and-connect-to-MySQL-Database-in-ASPNet-Application-using-MySQLConnector.aspx[^]
 
Share this answer
 
Comments
Gokul Athithan 16-Oct-15 4:38am    
I already connected MYSQL with the program. For Auto complete textbox it is not working. I have given above link that not working with my MYSQL .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900