assign query result to textbox?

Results 1 to 2 of 2

Thread: assign query result to textbox?

  1. #1
    Join Date
    Dec 1969

    Default assign query result to textbox?

    Using ASP.NET (VB), i have a query function that returns in result. Right know i the function returning a dataset. when i call the function I want to assign the returned value to a textbox. i know it is returning a value because i assigned the result to a datagrid and binded it so it showed it to me. How do I make the returned dataset(result) show up in the textbox? i will put what i have tried below. <BR><BR>Sub Button1_Click(sender As Object, e As EventArgs) <BR><BR>textbox1.text = MyQueryMethod("emp","task","division","client","04/01/2004","05/25/2004") <BR><BR>end sub <BR><BR>Thanks, <BR><BR>Santana

  2. #2
    Join Date
    Dec 1969

    Default RE: assign query result to textbox?

    Well it seems you know you can&#039;t set the text property to a dataset. So assign the returning dataset to a dataset object them get the data from it.<BR><BR>ds = MyQueryMethod("emp","task","division","client","04/01/2004","05/25/2004")<BR><BR>textbox1.text = cstr(ds.Tables(0).Rows(0)("colname"))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts