在C#中搜索按钮编码 [英] Search button coding in C#

查看:85
本文介绍了在C#中搜索按钮编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何编写搜索选项的编码。



问候

Balamurugan

Hi,
How to write the coding for search option.

Regards
Balamurugan

推荐答案

你应该进行搜索。



两者都是:

  • 你有没有搜索过,(我想你可能会找到很多例子,只有谷歌)?
  • 点击按钮,你的程序应该搜索(可能)另一个中设置的内容控件,里面例如,文件或字符串(你没有提供足够的细节)。
"You should perform a search."

That is both:
  • Have you searched for, yet (I suppose you may find many examples, just Google for)?
  • On button click your program should search for whatever is set in (possibly) another control, inside for instance, a file, or a string (you didn''t provide enough details).


control : - 1个文本框,1个按钮,1个datagridview



编写代码searchbtn_click事件



control:- 1 textbox, 1 button, 1 datagridview

write code searchbtn_click event

sqlconnection con=new sqlconnection("Data Source=,; Initial Catalog=database name;uid=sa; pwd=password");
con.open();
da = new sqlDataAdapter("select LSTinIPaddress , LSTOutIPaddress from tablename where computername='" + textbox1.text + "'", con);
                        ds = new DataSet();
                        da.Fill(ds);
                        dataGridView1.DataSource = ds.Tables[0].DefaultView;
con.close();





这只是一个示例...来自数据库的搜索文件代码...



i认为这是可能的......



Regard

Sham

:)



This is only a sample...plz impliment this code for search file from database...

i think is this possible...

Regard
Sham
:)


这篇关于在C#中搜索按钮编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆