asp.net - How to retrieve value from sqldatasource1 to textbox1 using vb.net? -


how retrieve value sqldatasource1 textbox1 using vb.net ?

i have table field employee id : 1001

i wannna retrive top1 employee id in textbox1 using sqldatasource1

something may help:

dataview odataview = new dataview(); odataview = sqldatasource1.select(datasourceselectarguments.empty); datarowview dr = odataview[0]; textbox1.text = dr["employeeid"].tostring(); 

i have not tested code though.

you may want read followings more info on sqldatasource:

http://quickstarts.asp.net/quickstartv20/aspnet/doc/ctrlref/data/sqldatasource.aspx http://www.aspfree.com/c/a/asp.net/programming-the-aspnet-20-sqldatasource-control/ http://www.defaultdotaspx.com/answer.aspx?questiontype=aspnet&questionid=149 http://www.mikesdotnetting.com/article/64/bind-data-from-a-sqldatasource-to-a-label

hope helps!


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -