First, please be more specific in what you actually using (language, DB). Also always state what you already tried by yourself, because codeproject.com is a supporting-platform and not a "others do my work"-platform.
Anyway, here are some starting points for you, how you could get the
values out of a SQL DB:
TSQL MAX Command: http://msdn.microsoft.com/en-us/library/ms187751.aspx
TSQL MIN Command: http://msdn.microsoft.com/en-us/library/ms179916.aspx
The SQL Query for getting a
value could look like this:
SELECT MAX(MyColumn1), MIN(MyColumn2)
If you do not know how to access a SQL DB using ASP.NET, you could start with something like this:
Using ADO.NET for beginners
Hope this helps to solve your problem.
Happy coding and have a nice weekend,