Tuesday, 20 August 2013

Add values from DB (Select Query) in a text. Asp.net

Add values from DB (Select Query) in a text. Asp.net

On my Homepage i made i Visual Studio i want to have some welcome text on
my firstpage.
The Thing is that i want in the middle of the text present some values
that i grab from my db with a select query.
Lets say for example:
Welcome to my Homepage!
Currently there are (Select Count(UserID) FROM users where Status =
'active') Users active on my page and (Select Count(UserID) FROM users
where Status = 'inactive') that are inactive.
Im really new to this but somehow i Need to run the my questions on
Page_load and then be able to take that value and present it in a Label or
something?
Thanks for your help

No comments:

Post a Comment