SharePoint Developer Center >
SharePoint Products and Technologies Forums
>
SharePoint - Development and Programming
>
creating user defined web parts
creating user defined web parts
- hi,
im inneed to create a user defined web part.
i know that web parts may be created usin visual studio 2005. i tried it from an tutorial in the following link
http://www.datasprings.com/Resources/ArticlesInformation/Sharepoint2007CustomWebParts/tabid/775/PageRecords/25/currentpage/4/Default.aspx
but in the add new web part my web part is not seen...
how to Deploy the assembly to the Assembly Folder (GAC)
how could i create a user defined web part..
pls anyone help me..
Thanks in advance...
Regards,
Siva- Moved byMike Walsh MVPMVP, ModeratorFriday, November 06, 2009 6:07 AMprog q not general (From:SharePoint - General Question and Answers and Discussion)
Answers
- Hi Siva,
IF you are done wit the coding art, then do the following to deploy the webpart in the shareoint site.
1. After buliding the roject with zero errors, Right click on the solution and go for -properties - Signing - Add a key name (your classname for easy reference).
2. In password, uncheck the password option. and then save and build the solution once again.
3. Open the folder where you have the solution At bin- debug find the dll of the solution you made.
4. Open the assembly folder at - Start - Run- type 'assembly' -Click Enter.
5. Drag and drop the dll file to the assembly folder.
6. in the assembly folder - Right click - properties- find the version and the public key token-
7. Add the safe control tags with informations find above in the web.config file of the sharepoint site.
8. Do an IISRESET and then open the site to find the webpart in the webpart gallery ( as said in the document)
Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS- Marked As Answer bysiva111kumar Wednesday, November 04, 2009 6:35 AM
All Replies
- You can drag and drop the assembly into the GAC. The best solution would be to package this as a WSP. Have a look at WSPBuilder http://www.codeplex.com/wspbuilder
There is a kickstart article for packaging a webpart as WSP using WSPBuilder http://rasor.wordpress.com/2008/10/12/wss-dev-quickstart/
What do you mean by user defined? Who is the user (the developer or front-end user)?
My SharePoint Blog - http://www.davehunter.co.uk/blog - Hi Siva,
IF you are done wit the coding art, then do the following to deploy the webpart in the shareoint site.
1. After buliding the roject with zero errors, Right click on the solution and go for -properties - Signing - Add a key name (your classname for easy reference).
2. In password, uncheck the password option. and then save and build the solution once again.
3. Open the folder where you have the solution At bin- debug find the dll of the solution you made.
4. Open the assembly folder at - Start - Run- type 'assembly' -Click Enter.
5. Drag and drop the dll file to the assembly folder.
6. in the assembly folder - Right click - properties- find the version and the public key token-
7. Add the safe control tags with informations find above in the web.config file of the sharepoint site.
8. Do an IISRESET and then open the site to find the webpart in the webpart gallery ( as said in the document)
Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS- Marked As Answer bysiva111kumar Wednesday, November 04, 2009 6:35 AM
- You can follow what Dave has suggested also, but since you seems to be doing it for the first time you can try with the steps above for a better understanding of the process.
Cheers.......
Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS - Hi Siva,Check this link-http://avinashkt.blogspot.com/2007/06/developing-custom-web-part.html
Regards, Avinash | avinashkt.blogspot.com - hi all,
your replies helped me a lot.. thanks for it.
dave hunter,,
the user is the developer. i want to create a web part by which color coding for task can be made.
im having a list of tasks and color coding should be done with that web part.. how to make it..
Ajith goerge,
Thanks for your massiva support.. pls provide me any inks for creating web parts for color coding.
AvinasKT,
your blog is super... im trying to go through it....
Thanks to all i advance,
Regards,
Siva - hi jith george,
As your reply helped me to get an idea about deploying web parts.Thanks for it.But still im having the same problem . i added the dll to assembly. i added it in safecontrols. did a iisreset but the web part is not present in add web part list..Pls help me in this issue...Thanks in advance,Regards,Siva. - Hi Siva,
While developing the WebPart, you must have created the *.webpart or *.dwp file.
Go to following path-
Site > Site Actions > Site Settings > Galleries > Web Parts > Web Part Gallery
Upload your *.webpart file there... now it will be visible in your Add Web Part pop-up.
Regards, Avinash | avinashkt.blogspot.com - hi avinash,
Thanks for your response i got it..
i have another one doubt..
can i create a web part which take input from a tasklist (some conditions like priority high) and change the color of such tasks.
is it possible how can i do this...
Thanks in advance..
Regards,
Siva. - You could create a dataview using SPD and use conditional formatting http://office.microsoft.com/en-us/sharepointdesigner/HA100996241033.aspx . If you want to create a custom webpart and implement this you will need to set the css class on a row depending on some conditional logic. I would suggest using SPGridView to display the information and on DataBound http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spgridview.ondatabound.aspx set the css class depending on the data for that row.
Dave
My SharePoint Blog - http://www.davehunter.co.uk/blog - hi dave,
whether it is possible to access a list in a web page with the help of C# code using Gridview..
is it able to check the datas with some conditions...
also can the color be modified for those tasks.
Advance Thanks,
Siva. - Hi Siva,
Verify whether your requirement matches out-of -box
Verify the link below : http://pathtosharepoint.wordpress.com/ - Color Coding
http://www.sharepoint-tips.com/2007/05/sharepoint-designer-article-2-creating.html
You can also perform what you have asked for, showing a sharepoint list in a gridview.
Access the site - list and add the columns in the list to gridview as bound column.
Or you can simply get the data from the list using a caml query, extract the data using a getdatatable() function and the add to the gridview da datasouce..............
You will find n number of ways to do it via coding as well as SPD customization.
Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS - hi ajith,
Thanks for your response..
im new to sharepoint... i doesnt know about caml query can you provideme tutorial web sites for using it...
also about gridview....
Thanks in advance..
Regards,
Siva - For reference of CAML Query and SPGridView, Please have a look at these links.
Introduction to Collaborative Application Markup Language (CAML)
http://msdn.microsoft.com/en-us/library/ms426449.aspx
Query Schema
http://msdn.microsoft.com/en-us/library/ms467521.aspx
GridView Overview
http://msdn.microsoft.com/en-us/library/ms752213.aspx
Displaying Data by Using the SPGridView Control in Windows SharePoint Services 3.0
http://msdn.microsoft.com/en-us/library/bb466219.aspx
Hope it helps.
Best Regards! - hi lily wu,
can u provide some sample codings on this topic...
thanks in advance..
Regards,
Siva...


