.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

make a default value in contentquery webpart

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :C#
when retrieving data using content query web part, if no rows are returned i want to type a message that no rows were found, how do i do that
I just want to learn more

View Complete Post

More Related Resource Links

Html.CheckBoxFor - how can I make checkbox default checked ?

I have:Html.CheckBoxFor(model => model.available) how can I have checkbox default checked ?

Make a webpart properties customizable only by an Administrator

I am developing a sharepoint 2010 visual webpart that will show some sort of ajax content. I have a property on the webpart for the refresh rate, but I want this property to be set only by an Administrator (or any specific group). What is the best way to achieve this? Thank you.

How to make a default Area in MVC2??

I have the area Blog with controllers (Post and Blog)i want that when the user acess my site without one area, it should redirect him to the Blog area inthe blog controller and in the index actionif i use:            routes.MapRoute(                "ClearPath",                "",                new {area = "Blog",controller = "Blog", action = "Index" }            );i got one error cause he search the view in the root folder: The view 'Index' or its master was not found. The following locations were searched:~/Views/Blog/Index.aspx~/Views/Blog/Index.ascx~/Views/Shared/Index.aspx~/Views/Shared/Index.ascx

Unable to reference custom XSL files in a custom ContentQuery WebPart



I'm doing a custom ContentQuery WebPart but i'm having difficulties referencing my XSL styles. I've googled a bit and tried to store the custom XSL files in the /Style Library/XSL Style Sheets/ and referencing them like this

<property name="MainXslLink" type="string" >/Style Library/XSL Style Sheets/CQWebPartMain.xsl</property>

and since i read SharePoint might have not be able to use SiteCollection relative urls i tried this:

<property name="MainXslLink" type="string" >http://my-dev-site/Style Library/XSL Style Sheets/CQWebPartMain.xsl</property>

and my first approach was:

<property name="MainXslLink" type="string" >/UIResources/CQWebPartMain.xsl</property>

Custom Webpart in Default forms of a list not coming in new list created by using List Template in S



I added a custom webpart in default editform.aspx of a list and saved it as a template in Sharepoint 2010. Now when I am trying to create a new list by using this custom list template I am not getting the custom webpart in the editform.aspx. Only default form is coming.

Any kind of help will be appreciated.

how to make webpart only show top list item?

Our office is new to SharePoint (including me!).  On our new SharePoint intranet I want to create a SharePoint Tips list.  I then want to put a WebPart on the home page that only shows the most recent tip added to the list.  I can't figure out anyway to configure that.  Thanks for suggestions.

Custom Webpart in Default forms of a list not coming in new list created by using List Template in S



I added a custom webpart in default editform.aspx of a list and saved it as a template in Sharepoint 2010. Now when I am trying to create a new list by using this custom list template I am not getting the custom webpart in the editform.aspx. Only default form is coming.

Any kind of help will be appreciated.

Where to find (or how to make) OOB WebPart CDATA xml for onet.xml file


When you are attempting to add Web Parts in Modules to an onet.xml file, what is the best way to find (or make) the appropriate xml information that goes inside the <[CDATA [ ]]> element.

In particular, I'm trying to add the "Shared Documents" webpart, but from the sts (OOB Team Site template), the onet.xml does not have it listed (or is the oob template for Team Site not "sts"?).

But in general, how do you get this info for customizing web part include referencs in an onet.xml?

How to make it work multiple "I need to.." webpart in the same page..


I am trying to create multiple "I need to.." web parts in the same page.  But only first created web part working.  Rest of all the web parts either not respond after click "GO" button or goes to the first web parts selection, even click on another web part.  I am using Team Collaboration web page.  I tried to create different custom list to different web part did not work, and link to the same custom link with different filter settings as well did not worked.

Some search across the web showing few people have same problem, but no clear fix found.  Does anybody know some sort of tweaking or coding for this problem..

I am using Sharepoint 2007 with MOSS2007..


Make IIS As default server


Hello all,

I want to know how to make IIS as default web server on machine instaead of built cassini web server..

Thanks in advance.

Sharepoint 2010 Advanced search box webpart - apply a default scope


My Advanced search box webpart return result from all the web appications and not just the one that it is in, i know i can create scope and spcify rules on it but i dont see an optoin of forcing
only this instance of web part to use a spific scope.

1. any way i can force it to use a scope behind the scenes instead of having the user select it.
2.i tried to use search core results web part but  ASB webpart is not open to connections even though in the properties i select "Allow connection", any way to make this combination work
3.since all my web application are using the same Search service appliction, could that be the reason that the ASB is returns results from those sites as well or is it that it returns result from all the web application in the farm?
3. Is there any place on the internet where i can find documentation on all the web parts.


How to make Custom SharePoint 2010 Webpart work on MOSS 2007 Environment



I've built a SharePoint WebPart in SharePoint 2010, using SharePoint Assembly version Now i've to make this Webpart such that i should work on SharePoint 2010 and MOSS 2007. The version no for both the versions are different, so do i need to create separate web-part for both version or is there any other way?

My current webpart is built in env, which has

SharePoint 2010, Windows 7 64 Bit, VS 2010.

Reference is added to SharePoint DLL which is in 14 Hive ISAPI.


How can i make this generic, so that i should work on both version, i've not used anything specific which is only in SP2010, its just a simple webpart.


Akhilesh Nirapure

How to make a textbox or a label in my own webpart connectable with webparts from sharepoint webpart

I'm developing a webpart which need to be able to receive data from standard webparts from sharepoint.
My webpart needs to get data from a sharepoint formfield in an editform from a list.
I know how to connect 2 standard sharepoint webparts with sharepoint designer. But I can't seem to figure out how to connect my own webpart with a webpart from sharepoint. All I can find on the internet are examples where you need to have your own provider and consumer, not just the consumer.
So basicly I need my webpart to be able to connect with sharepoint webparts, just one connection is enough.

I'm developing for sharepoint 2007 with visual studion 2008. 

Why rendered WebPart is not editable on Custom default.aspx?



I am added (rendered) a existing webpart into my custom default.aspx, here the webpart is rendered but it is not editable,

But if go to edit page of custom default.aspx and from there if I add a new webpart it is editable

so, here my question is why first webpart is not editable?




How to make Excel open in application not browser by default


I'm facing a problem here. I tried the to open an excel file (.xls) which was attached in a Calendar Item.

On 1 PC, it opens automatically with the Excel application and thus the user is able to edit and save.
On another PC, it opens in the browser and the user is unable to edit / save the file.

Initially, I tried and thought that it's user rights issue but apparantly, it is not.

How can I make the .xls to open in excel by default? Can someone help me?

Really appreciate the help and answers.


Setting default webpart chrome style

Is there anyway to have all webparts in a site default to a certain style...(Title and Border) ? I'm having a hard time finding anything in the onet.xml

perevent limit number of items in contentquery webpart




I want to perevent limit items from content query webpart .

there is a check box in the editor called "Limit the number of items to display". How Can I uncheck this check box by code ?

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