How to make a search function for sql database , a

2020-02-07 08:08发布

I couldn't find : Lets say , I have 3 textboxes on my asp.net website:

1.Name ___________
2.Code ___________
3.ID   ___________

I want to add a label near the texbox , and if someone edits the information from name or code or id , the label will turn to -> date when the info was changed there and so on .

so it should be like this lets say :

1.Name ________ : Info from Name was changed last time 02/20/2012 .

also I want to make a search function .

标签: asp.net
2条回答
smile是对你的礼貌
2楼-- · 2020-02-07 08:24

on buuton click u can update or keyup event ... or after mouse lose focus on textbox

查看更多
我命由我不由天
3楼-- · 2020-02-07 08:37

Make another coulmn in your database & update with things changed by user with date...

to search

first make that coulmn indexed (for fast search)

query will be like :

select * from table where Item like @search+'%'

or

you can use match or contain query for full text search...

remeber do not use query like

select * from table where Item like '%'+@search+'%'
查看更多
登录 后发表回答