Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
February 09, 2011
hai all can any one plz tell me ,, in my project design there is one button show customer id , and when we clik that button i want to display all customer details avail in database should be display in that text blok so plz tell me how to write code for that
Posted Date: February 10, 2011 Points: 5
no one is there to ans my que hmmmmmmmm
Posted Date: February 15, 2011 Points: 5
U cannot display all the customer id in a text box rather u can use data grid to display all the records,
Here i give the coding for displaying in datagrid,
Copy datagrid from tool box and place it in ur form
in button click event try this code,
SqlConnection con1 = new SqlConnection("Server=LocalHost;DataBase=DatabaseName;Uid=sa;Pwd=sa");
SqlCommand cmd3 = new SqlCommand("select customerId from TableName", con1);
DataTable t = new DataTable();
SqlDataAdapter dr = new SqlDataAdapter(cmd3);
this.DataGrid1.DataSource = t;
In think the code will help u
Posted Date: February 16, 2011 Points: 5
To post reply
Related Questions Related Questions
How to write to a text file in C#
User can not select TEXT for copy paste from my .aspx page...
How to show hyperlink, Linkbutton text on the tiltle bar of Internet explorer...
How to restrict user to (ctrl+v) option for a text box..?
display text in other page using c#
display text in other page
disply contacts in text box seperated by cama
How i can read a Text from Image in a web application ?
How to re size the text (Font) in asp.net website
textbox text values should not be copied or edited
Latest Forum Questions From The Same Category
Share WPF Application over net
Rich Desktop Interactive application
How To Find the Combobox in Wpf
Getting Row Value is null in WPF.
Combobox Binding in WPF
Add button to datagrid Dynamially in wpf
Detecting Mobile Device IMEI, IMSI, Model, Comport Information using AT commands in VB.Net
Show the Default Text Of Combobox as "--Select--" when combo is binding to dataset.
how to stop .swf html page any button click in wpf,any idea please share with me
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend