Binding to an <asp:label>

  • Thread starter Thread starter John Smith
  • Start date Start date
J

John Smith

I created a dataTable that returns a value from a stored procedure.
How would I bind that results of a query to an <asp:label>?


Thank you!
 
Hello John Smith,

You haven't specified the return type of the value and Parameter Direction
so it is difficult to me to suggest proper solution.However you can bind the
value to label just assigning to the Text property.

eg:

lblYourLabelName.Text = cmdSelect.Parameters("ReturnValue").Value

(You must cast the value if it is not the string type.Here I assumed that
the you are getting the value from Parameter collections of the command
object)

Let me know if you have still problem of course in more discription.

Thanks,
Bhavesh Patel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top