webparts

How do you disable adding the same webpart multiple times from an asp:catalogzone?

If have a standard aspx page (non-sharepoint) that hosts webparts It contains one asp:catalogzone and four asp:WebPartZone's. I have a business requirement that my new webpart must start in the catalog and a user can choose whether to add it to a zone to display it, (not displayed by default). Easy so I add it to the catalog zone inst...

Adding html to CreateChildControls() method

I'm using MOSS 2007 in my webpart within my CreateChildControls() method I have the code below: protected override void CreateChildControls() { base.CreateChildControls(); Panel myPanel = new Panel(); myPanel.ID = "SelectionPanel"; this.Controls.Add(myPanel); this.myGridView = new G...

apply CSS list style buttons to server created button controls

Hi, I have some CSS that uses lists to create 3D buttons styles similar to the link below: http://articles.techrepublic.com.com/5100-10878_11-5323375.html My problem is I have buttons which are server controls and thus render html buttons. The question is how would I rewrite my button code to use lists and hyperlinks so I can apply ...

How do I get the username of the currently displayed profile in a SharePoint Webpart for MySites

I am writing a web part that will be displayed in public SharePoint My Sites. This part will display some 3rd party information for the user whose profile is being displayed. For example, if UserA is viewing UserB's profile, then it will show some information about UserB. How do I go about getting the username 'UserB' in the webpart c...

Error on AddWebPart (Sharepoint 2007)

Hi, I am trying to use the AddWebPartToZone web service call within Sharepoint 2007 to add a webpart programmatically to a webpart page. We get a soap exception (Microsoft.Sharepoint.SoapServer.SoapServerException). The webpart i am trying to add is the original version of the Chatterbox app found on codeplex. When i try and add a con...

Communicating between controls in a Webpart

We have a webpart that has 2 user controls. We want the second user control to be able to read a value from the first user control. One solution we have considered is an event in the first control, that updates a value in second user control. But not sure where to place / hook up the events so that this works. Anyone have any idea how...

adding custom property to webpart with a custom toolpart

Hi, I'm trying to add a custom property to my webpart as below: [Personalizable(PersonalizationScope.Shared)] [WebBrowsable(true)] [System.ComponentModel.Category("Settings")] [WebDisplayName("RSS List Path")] [WebDescription("")] public string RSSListURL { get ...

Where can I learn how to style an ASP.NET WebParts page?

Hey, I'm trying to style a custom WebParts portal page I'm working on, but I'm lost on how to style it. Are there any resources out there that show how to style the WebPartZone, the PageCatalogZone, and the WebParts themselves? Thanks. ...

How do I get WebParts to work in Firefox and Chrome?

Hey, I'm using the ASP.NET WebParts and whenever I try to view my page in Firefox or Chrome, the Verbs menu does not appear and it just spreads the items along the title bar, making my page too wide to be viewed without scrolling. How do I change this so that the appearance is consistent for IE and Firefox? ...

Can't display Sharepoint List view webpart

I have a feature that automatically creates some web part pages. I want to display a list in my web part page but I can't get the list to show up. Here is my code in my element.xml file: <Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt; <Module Path="PageTemplates" Url="" > <File Url="Tab3.aspx" Name="Tab3.aspx" Ty...

Sharepoint web part property Editor problem

Hi all I create a custom sharepoint web part with a custom Property Editor. There are one Listbox and one button. When I click the Button, it would add a new item to the listbox. But, when I click the Apply button, the number of the listbox item would be twice. Does anyone meet this problem before? Thanks ...

Class-level Static Variable per Instance.

Hi, I'm trying to do the following: I need a static variable to get a ListItemCollection from a List control (I can do this, but if I don't set it as Shared It's not preserving the values as it should). The thing is that this class is a SharePoint webpart, so I most probably will be using the webpart more than once, and I need this vari...

Is it possible to put a Content Editor Web Part in a sharepoint app page

Is it possible to put a Content Editor Web Part in a sharepoint app page along with the ability to edit the web parts contents from the browser? In other words have it behave as it would on a web part page. I can get the web part to show but I have no clue if it can be setup for in browser editing on the application page ... I can't get...

how to make a web part visible to particular users in sharepoint?

I have created a webpart annual results.This should be available only to managers and not for developers in the home page.How to achieve it? TIA ...

Cannot execute System.IO.File.Move to a network drive from SharePoint Server 2007 (MOSS).

Hi All, I am using VS2008 C# and MOSS (SharePoint Server 2007). I have created an asp.net web form which appears on a WebPart within a SharePoint site. When submitting the form, a small .csv file is generated. Ideally I want to have this file created on a network drive (on another server), but for some reason I cannot do this. I can c...

Programatically set the AuthorizationFilter on a web part while still having designer support for the web part.

I have an intranet portal that uses windows authentication and the WindowsTokenRoleProvider for security. I want to implement security on particular web parts so that only members of a Windows domain group can view them. So far this is easy. Now I want to test this, in our test environment we'd like to use a different group for the ...

SharePoint Custom Web Part throws SELECT permission denied on object 'xxx', database 'yyy', owner 'dbo'

Hi, I have created a Custom Web Part in SharePoint 2007 using VS 2008 on the dev server. It uses the SQL DB. Everything works fine on my server with testing db which I recreated from the backup client gave me. Now I'm moving it over to the clients' production server. I was able to deploy, install and activate it. But when I'm trying t...

How can I user ConnectionProvider/Consumer with WebParts that use RegisterInterface?

I'm writing new web parts that need to communicate with pre-existing third-party webparts. If I use RegisterInterface to provide a connection point, I can set up connections between my new web part and the third-party ones. However, so far I haven't been able to manage that using ConnectionProvider/ConsumerAttribute -- the connections de...

how to add radiobutton for a category in editor part sharepoint

how to add radiobutton for a category in editor part sharepoint?? for dropdownlist, textbox ,checkbox we can use enum,string or int,bool but if i want to add radiobutton,radiobuttonlist or any other control in a particular category then how can add it.? http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.custompro...

SharePoint extensions for VS - which version have I got?

I'm using Visual Studio 2008, and have downloaded VSeWSS.exe 1.2, to enable Web Part development. I am new to SP development, and am already bewildered by the number of different versions of SP, and the VS add-ons. This particular problem has come up, which highlights my confusion. I selected Add -> New Project -> Visual C# -> SharePoin...