Author |
Topic  |
thermal_seeker
Junior Member
 
United Kingdom
430 Posts |
Posted - 14 June 2010 : 17:36:39
|
If this is the wrong place to post this... I apologise 
I am trying to get the Member count, Forum count, Topic count and post count into a .NET datagrid on a webpage outside of the forum. It seems that I cannot draw the info directly from the database tables, so would I have to create a page that writes the stats into a new database table and draw from that or is there a simple way to do this?? |
No good at coding, but I can plough a field !! |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 15 June 2010 : 02:18:10
|
I can't see why you would want to display this information in a gridview it is not data that would lend itself to being tabulated, you are basically just trying to display 3 distinct values, so why put it in a grid ?
If you really must display it in a grid, create yourelf an object with three properties, fill the properties by interrogating the db and then assign your object to the grids data source ( even though you don't want one you will need to create a list of your object even though there is only one since you can't assign a singleton object as a datasource)
|
MVC .net dev/test site | MVC .net running on Raspberry Pi |
 |
|
thermal_seeker
Junior Member
 
United Kingdom
430 Posts |
Posted - 15 June 2010 : 17:00:17
|
I suppose I was thinking that a grid would look ok at the bottom of my page!! However, just a single line at the bottom of my page would be ok displaying those 4 results.
so if I re-phrase this: How easy is it to put those details on a page (VB .NET) outside of the forum.
Please bear in mind I'm a ploughman and not a coder  |
No good at coding, but I can plough a field !! |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
|
thermal_seeker
Junior Member
 
United Kingdom
430 Posts |
Posted - 16 June 2010 : 01:15:09
|
Thanks HuwR |
No good at coding, but I can plough a field !! |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 16 June 2010 : 03:09:09
|
I will make it into a control that you can just plonk on a page and configure via the webconfig, that should make it easier for you. What exactly do you want to be able to show, the control I have currently basically replicates the stats section at the bottom of default.asp
 |
MVC .net dev/test site | MVC .net running on Raspberry Pi |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
|
Carefree
Advanced Member
    
Philippines
4217 Posts |
Posted - 16 June 2010 : 03:22:05
|
Here you go. You will have to change the connection string to point to your database (& the table prefixes if you modified them). Other than that, it will give you a table with your data.
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
|
Carefree
Advanced Member
    
Philippines
4217 Posts |
Posted - 16 June 2010 : 04:41:41
|
Whoops - read the request and ignored the parameters lol. |
 |
|
thermal_seeker
Junior Member
 
United Kingdom
430 Posts |
Posted - 16 June 2010 : 13:13:06
|
quote: Originally posted by HuwR
I may not be able to show all that info as some of that relies on it using .net membership providers (members online for example)
also what version of .net is your site using?
.NET 2.0 (with 3.0 and 3.5 extensions installed)
I'm not worried about members online.. the 2 main ones would be the member count and forum count. The topic count would be a bonus.
ie. we currently have xxx members there are xxx forums with xxx topics
That would do it nicely... I'm a plain and simple man 
Thanks Huw
Dave |
No good at coding, but I can plough a field !! |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
|
thermal_seeker
Junior Member
 
United Kingdom
430 Posts |
Posted - 16 June 2010 : 17:34:00
|
Thanks Huw.. there really is no rush.... I'm snowed under with farming work at the moment :( |
No good at coding, but I can plough a field !! |
 |
|
thermal_seeker
Junior Member
 
United Kingdom
430 Posts |
Posted - 24 June 2010 : 14:48:04
|
Any luck with this yet Huw??
Dave |
No good at coding, but I can plough a field !! |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
|
thermal_seeker
Junior Member
 
United Kingdom
430 Posts |
Posted - 25 June 2010 : 05:21:22
|
no worries thank you
Dave |
No good at coding, but I can plough a field !! |
 |
|
Topic  |
|