当前位置: 动力学知识库 > 问答 > 编程问答 >

asp.net - how to make the data show when i start typing

问题描述:

am working on a website using asp.net

but am new to this

i have information stored in database

and then in the form i have the following

code description description (ar)

these are colums of the table in the database

i want the info in the database to show wheni start typing

for example if i write "a" all the words that start with a should show

how can i do that?

and what should i write here

 protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)

{

}

??????

网友答案:
  1. Make event listener to your html text field, like
  2. Do an ajax call to server method/action sending your input contents
  3. Query database to get TOP(N) records, containing/starting with text you sent to server
  4. Return strings/nothing to client side
  5. If there are some results found show a tooltip, containing results
网友答案:

you should use a ui framework for this purpose, see this example on knockoutjs

分享给朋友:
您可能感兴趣的文章:
随机阅读: