Dear All, This Md Syedur Rahman. I am trying implement autocomplete without using ajax in Asp.Net. Given code below: frmCrmOffer.aspx file: <head> <script type="text/javascript"> $(document).ready(function () { var item = '<%=this.data%>'; var lists = new Array(); lists = item.split(','); $("#txtauto").autocomplete({ source:lists }); }); </script> </head> .cs file protected void Page_Load(object sender, EventArgs e) { FillData(); } public void FillData() { DataTable dt = new DataTable(); SqlCon = db.GetDBConn(); MySqlCommand sqlcmd = new MySqlCommand(); SqlCon.Open(); MySqlDataAdapter da = new MySqlDataAdapter("select name from mbi_customers where type='Dealer' and status=1 order by name", SqlCon); da.Fill(dt); SqlCon.Close(); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { data += (Convert.ToString(dt.Rows[i]["Name"])) + ","; } } } when I run application generate this Error The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). How can Solved this Problem. Md Syedur Rahman syed.syed04@gmail.com
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)