Rook Question

  • Thread starter Thread starter Dave S.
  • Start date Start date
D

Dave S.

Very new. Need to bind a value from a stored procedure that returns a single
value to a label. I have found lots of examples of how to do this with a
datagrid using .filll and databind but no such methods for a label. Thanks
for the help
 
Dave said:
Very new. Need to bind a value from a stored procedure that returns a single
value to a label. I have found lots of examples of how to do this with a
datagrid using .filll and databind but no such methods for a label. Thanks
for the help

You could just assign the value (maybe with .ToString()) to the Text
property of the label.
 
Something like this (not tested):

<asp:Label" runat=server id=myLabel Text="<%# LabelText %>"></asp:Label>

where LabelText is the name of a property that will return stored procedure
result. If it's just a label, you don't really need to databind. Just run
the sp, get the value and assign it to the label's Text in the code.

Eliyahu
 

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