0
votes

in SharePoint 2007 (moss)

i need to implement a button . a button to create a custom action. this custom action registers a JavaScript file and a startup script. I have a C# code for this purpose. i am not sure how to use the C# code. i was told the C# code just needs to be compiled into an assembly and deployed to the SharePoint server. however i dont quite know how can i do that.

( In case required, Reference to what i am trying to do is at this url )

any help appreciated .

2

2 Answers

1
votes

Here is a nice walkthrough. Hope it will help you out mate.

Deploy MSDN

Walkthrough: Creating a Webpart

1
votes

In article you see that "feature" file contains

ControlAssembly="SharePointSolutionPack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4a7cd02bdf107f7a"
ControlClass="Motion10.SharePoint2007.SelectItemsAction"

That means the code goes inside class SelectItemsAction within Motion10.SharePoint2007 namespace.

SharePointSolutionPack is name of Dll file, which, when compiled, you copy to C:\Windows\assembly

However you must also copy feature defintion to (default location): C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\FEATURES

A helpful resource for You

Anyway, what i wrote is not very helpful because i'm not going into details. See this step-by-step example on creating sharepoint button (exactly what you need) that uses Visual Studio extension that helps you develop features and deploy them (without copy-pasting i meantioned above). (You'll learn how to create features with that article)

It is important to learn about sharepoint features, because before i understood how to create features, it was hard to do anything in sharepoint (couldn't understand sharepoint articles, when i saw code, all the time question pops up - where do i put that code?).

Good luck!