How to retrieve value from sqldatasource1 to textbox1 using

How to retrieve value from sqldatasource1 to textbox1 using ?

i have a table with field Employee Id : 1001

I wannna retrive the top1 employee id in textbox1 using sqldatasource1


Something like this may help:

DataView oDataView = new DataView();
oDataView = SqlDataSource1.Select(DataSourceSelectArguments.Empty);
DataRowView dr = oDataView[0];
TextBox1.Text = dr["EmployeeID"].ToString();

I have not tested this code though.

You may also want to read the followings to get more info on SQLDataSource:

Hope this helps!

Need Your Help

Google script says - Exceeded maximum execution time

javascript google-apps-script google-spreadsheet

I am using the below script to delete duplicate rows from the google spreadsheet. The script was working good but as the data in the spreadsheet is being added daily, now the script is throwing "Ex...

How to mix a VB program with a C++ Program

c++ vba user-interface

I have a C++ program that I wrote, and I would like to give it a user interface. Is there any way I can run a C++ program and put the information from the program onto the UI of a VB Application?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.