webparts

Feature element repeatedly added with every feature activation/deactivation

This is a very minor behavior when compared with the entire scope, but it is one that I'd like to put a stop to. I have created a very, very simple SharePoint Feature. It has two elements in its manifest: an aspx webpart page, and an elements xml. I'll paraphrase my elements xml, which just adds a module, below. <Elements xmlns="http:...

Determine the property name in a SharePoint Webpart for XML

I'm employing a custom webpart that is made by an unaffiliated third party. I've created a feature which adds this webpart to a page. It's working mostly fine, except that I can't figure out the name of a specific property that needs to be defined. I tried obvious ones that match the display name on the tool pane view, adding the company...

Insert an ajaxified Webpart into an existing MOSS site

Hi everybody, I need to code a webpart which purpose is to asynchronously fetch some documents and display them into an existing page. Unfortunately I have to face a lot of rescritcions and my struggle to find a solution seems useleess so far. 1) I cannot use Microsoft asp.net ajax 2) I must use Jsonp because the called service (page, w...

Get the GUID of a WebPart in SharePoint 2007

I'm trying to emit some jQuery and other Javascript that will hide and show WebParts on a page. What I'd like to do is find one of two things: The ID of the table cell that contains the WebPart (i.e. MSOZoneCell_WebPartWPQ5) The WebPartID of the div tab of the WebPart that shows in the HTML (i.e. WebPartID="059611a7-adef-479e-bda9-fe57...

How to access SharePoint web part properties?

I have created a feature for SharePoint 2007 that has a web part. I have added a custom property to the web part like so: [Personalizable(PersonalizationScope.Shared)] [WebBrowsable(true)] [Category("My Custom Properties")] [WebDisplayName("ServiceURL")] [WebDescription("The URL for the Wcf service")] public string ServiceURL { get; set...

simple web parts in asp.net show as blank page

I am trying to develop web parts in VS 2008/WinXP I created a Web Site project, and added a couple of web parts within the default form in default.aspx <form id="form1" runat="server"> <div> <asp:WebPartManager ID="WebPartManager1" runat="server"> </asp:WebPartManager> <asp:WebPartZone ID="WebPartZone1" runat="server"> ...

Connecting WCF from Webpart

I am consuming a WCF Service from a webpart in Sharepoint 2007. But its giving me the following error: There was no endpoint listening at http://locathost:2929/BusinessObjectService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. -...

How to avoid hard-coded credentials in Sharepoint webpart?

I am building a Sharepoint web part that will be used by all users, but can only be modified by admins. The web part connects to a web service which needs credentials. I hard coded credentials in the web part's code. query.Credentials = new System.Net.NetworkCredential("username", "password", "domain"); query is an instance of the we...

How to customize form web part to include multiple columns in search??

Hi, I have edited my form web part to look like this. I am a newbie to moss. As i understand, form web part allows only 1 column to be mapped to my list at a time. I need to configure to it have multiple columns mapped to my list view. Do I need to change any javascript function or use sharepoint designer. I have spent a week trying ...

How to achieve this site structure?

Hi, I need to develop a website that looks like this. In central administration however, in the operations tab, It shows Central Administration--> Operations. But I checked, operations is not a subsite. Then what is it. In my application, I always get Home--> Operations. To add to trouble,it changes the name at the top as Operations....

MOSS Content Query Web part itemstyle.xsl

Hi, I have a Content Query Webpart (CQWP) pulling the URL and title from a NewsLinks list. The CQWP uses the XSLT style LVIS.News.Links defined in ItemStyle.xsl. I need to sort the title @Title0 field as commented out below because it causes an error. Does anyone know whats causing this error? - Many Thanks. The XSLT code is below: <...

SharePoint Designer - xmlHTTPRequest innerHTML

Hi, I have a sharepoint page that filters a data view from a query string in the address bar. I wanted to add further functionality by also returning back any of the files in the main sharepoint library that matches the query string in the address bar. I added a content editor webpart and I added a xmlHTTPRequest that imports the search...

Sharepoint people search - sort alphabetically accross pages

Hi, I have a Sharepoint 2007 MOSS People Search webpart, used with a Paging webpart to display search results of people. The people search webpart displays results alphabetically on each page. But the results are not sorted alphabetically across pages. Does anyone know anyway to acheive an alphabetical sort of people results accross ...

SharePoint web part - SQL statement not reflecting change

I recently wrote a SharePoint web part in C# that pulls information from a SQL database with some parameterized queries based on user selections. This involves a list of customers in a dropdownlist that is populated from a datareader like so: while (dr.Read()) { string customerNameAndCity = dr.GetSqlString(1).Value + " - " + ...

Which type of applications can use WebParts ?

I tried using webparts on an asp.net webpage and got a blank screen. While googling, I came across this link http://stackoverflow.com/questions/2672535/simple-web-parts-in-asp-net-show-as-blank-page which made me wondering, which type of applications should ideally use WebParts ? Please share your real world experiences. ...

Ajax doesn't work with GridView on a sharepoint web part

Does anybody know the way how to make a GridView, placed inside a Sharepoint Web Part, to use Ajax? I placed a ScriptManager on a MasterPage, an UpdatePanel inside a web part. Every type of control works fine with ajax, except of GridView that forces to reload the entire page instead of updatepanel contents only. The resason for that, I...

Using Microsoft.Reporting.WebForms.ReportViewer in a custom SharePoint WebPart

I have a requirement where I have to display some data (from a custom db) and let the user export it to an excel file. I decided to use the ReportViewer control present in Microsoft.Reporting.WebForms.ReportViewer. I added the required assembly to the project references and I add the following code to test it out protected override vo...

Can I use jQuery ajax in a SharePoint WebPart without having to worry about the same origin policy?

My current project for work involves developing a SharePoint 2007 WebPart which will be deployed by our clients. To provide a better user experience, I am "simulating" ajax via setting the SRC attribute of an IFRAME to be the address of an HTTP handler. These handlers are deployed to the layouts directory in the 12 hive. Although this w...

Connecting Web Parts

I'm having two connected web parts, the consumer has a button that when I click refreshs the page, which in turns kills the connection. I need to use the passed value from the provider in the btn_Click event. How can I do that?. Is this possbile?. ...

WSS-3.0 Web Parts using 4.0 framework

Is it possible to develop Web Parts using the 4.0 framework and use them in WSS 3.0? I've searched all over the place and can't find anyone else asking this question which makes me think the answer is an obvious "no". ...