.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Display 'Top Queries Over Previous 30 Days' to users

Posted By:      Posted Date: August 26, 2010    Points: 0   Category :SharePoint

In the Site Usage Reports, there is a section for 'Top Queries Over Previous 30 Days'. I would like to display this information to users. 

Is there a existing webpart for this? 
Is the data stored in a list that can be used for this purpose?


Steve Clark

View Complete Post

More Related Resource Links

Want to create Page URL rewrite based on Users GUID and Display name?



I am using the asp.net membership. 

On my site I have a Profile.aspx page.

In the code behind of this page,  i get the logged in UserId (Guid) and pass

this to a method in my DAL. GetUserByUserId()


In my database I have a Table called Member which the method gets the data from

and displays details on the page about  the user.


What I want to happen is when they have logged in and are diverted to Profile.aspx,

the page URL shows www.MyWebSite/Profile/UsersName 

for example



is this possible. In my Member table I have FirstName and LastName columns or do I get the

name from the membership table.


even better would be they go straight to www.MyWebsite/JohnSmith.aspx


thank you for any help






select records within 30 days of previous records

I have a table with a list of patient id's and there begin date and end dates as follows: ID     begin_date  end_date 1234 10/09/2009 10/16/2009 1234 12/16/2009 12/22/2009 1234 12/28/2009 12/30/2009 1234 01/13/2010 01/19/2010 1234 04/29/2010 05/05/2010 what i need to do is select the records that have an end_date within 30 days of a begin_date. So in the above example, i would need to get the following records: ID     begin_date   end_date 1234 12/28/2009   12/30/2009 1234 01/13/2010   01/19/2010 Because 12/28/2009 is 30 days within 12/22/2009 (previous end_date) and 01/13/2010 is within 30 days of 12/30/2009 (previous end_date) and 12/22/2009 (2nd previous end_date). is there a good way to do this using T-SQL?

Hide / display page layout columns for different users


I'm looking for a way to hide some columns of a page layout so they will be shown only to specific audience (for example hide the "created by" column so some users won't see it). Any suggestions?


Display mulitple queries


For my first MVC app I'm trying to build a page that takes user input and returns data based on that input. 
So far it's working and pulling data from one table.  I wan't to be able to display data from multiple queries
and display them on separate tables on the page.

As you can see below I'm returning data from the CSLA_Depot table.  How do I return data from multiple
queries and display them in the view all on the same page?

public class HelloWorldController : Controller
        UAStagingEntities db = new UAStagingEntities();

        public ActionResult Index(int? id)
            var depot = from m in db.CSLA_DEPOT
                        where m.DEPOT_ID==id
                        select m;

            return View(depot.ToList());


Gridview display users and personal profiles



I am trying to populate a gridview control to display the current registered users on the site.

I query various tables from the ASPDOTNET.mdb database in order have a list comprising of UserNames, Email address, LastLoggedOn, etc. This bit is fine and it displays all the details.

The part I'm having a problem with, is I would like to add the FirstName and LastName to each row also. But I'm not sure how to get at the record. In the profile table I have a column with this detail within plus other personal details but I only need to retrieve the names and display that in the gridview.

Cheers Rob.


ASP.Net version 3.5

Access Database provider ASPDOTNET.MDB

(setup exactly the same way as the sql express table structure.)



How to display users and number of users online


We have implemented the ASP membership and roles..and we would like to display the users currently logged in and also display the number of users online so we can display that on the page. The list of users woudl only be available to our admins. BUt the number of users will show for everyone.



How to remove weekend days from current row date and Previous row date ?


column0    Column1                     ResultColumn

1              Mon, 07/12/2002           0 days

2              fri, 11/12/2002              4 days

3              mon, 14/12/2002           1 days

Thanks & Regards, PSWASULE

Display previous week and following week of Timesheet on webpage


I am new to ASP.Net & C# so bear with me.

I have a working timesheet which displays on a webpage, what I was also wanting was to display the previous week and the following also on the same page.  Can anyone help with this?  I will attach both the .aspx page and the aspx.cs page.  I have hardcoded the date into the webpage just for ease of reference at the moment.

Your help would be appreciated.


aspx.cs page:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;

public partial class Timesheet : System.Web.UI.Page
    String strConn = "";
    DataTable dtTaskStaffList = new DataTable();
    DataTable dtTaskEditList = new DataTable();

    protected void Page_Load(object sender, EventArgs e)
        strConn = System.Configuration.ConfigurationManager.ConnectionStrings["CMConnectionString"].ConnectionString;

        if (!Page.IsPostBack)
            //txtCalendarDate.Text = DateTime.Now.ToString("dd/MM/yyyy");


    protected void 

Users display as "domain\username" rather than "firstname lastname"


Hi All,

     In my new 2010 setup, I see domain\username instead of their firstname lastname in the top-right-hand corner. How and where can I set up to show firstname lastname. I apprciate your response.



Users use Excel-Pivot table to query the cube, how to capture those queries?


Most of our users use Excel'10 for querying the cube,

I've set up the querylog-properties in SSAS engine but it only captures the query from SSAS engine and not from the other platform such as Excel. So, when I use Usage based aggregation wizard, it shows the users/ueries from SSAS engine only. Is there any way to capture the user/query information that comes through Excel pivot table and somehow create aggregation through that information?


Any suggestion/help is very much appreciated,


Display progress to users from code behind


I have created a custom ribbon button which assembles multiple documents into one pdf.  I used Bart X. Tubalinal's excellent example http://www.deviantpoint.com/post/2010/05/08/SharePoint-2010-Download-as-Zip-File-Custom-Ribbon-Action.aspx to create my ribbon button and action.

The process of converting word doc's to pdf and then assembling them takes some time.  I would like to display progress to the users either with the Notify or Status feature.  (It would be cool to have each document name slide across their screen with the Notify method when starting the conversion for that document).

In a nutshell the ribbon executes a command in a custom.js file.  That file compiles the id's for each document and then opens an aspx page.  that aspx page has a page load method which then converts each document into a pdf and then merges each one together to form one document.

But I believe that the aspx page that get's opened is preventing the site to update iteself with notifications.  here is the js file that i'm using:

/// <reference name="MicrosoftAjax.js" />

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Some areas of the site usually contain less-dynamic information. Internal memos and corporate policies are common examples of this information. One option for this information is to post these documents in a document library. Documents in a library are often stored in a few different formats: Word, Acrobat (PDF), or HTML. Each of these formats has its drawbacks.

GridView inline Master/Detail record display

This code drop is part of a smash and grab series. If you're in a rush, you can just grab this code and insert it into your application, no understanding is required. When you have some time (ya, right) you may want to review the source code.

Display data in gridview dynamicallay

I have AD domain which has 100000 users, I want to display all the users in gridview controls.Actually it is displaying users in gridview after parsing entire domain which takes around 30 min. I want to display the users while loading itself.It is continously getting user information from AD domain and getting each user details, I want to display the users information which already queried instead of waiting till getting all users information

asp.net display data in gridview

i want to display data in gridview binded to a sql datasource
but the problem part is i want to bind a field of that datasource to a dropdownlist and when a item is selected in that dropdownlist then correcposnding to that data will be displayed in gridview...

display data into GridView from excel sheet

I have to display data from excel sheet into my gridview and also I need to figure out a way to store data into excel files from my web page. I am using C# 3.5, VS 2008.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend