.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

How to change the folder icon dynamically based on the name of folder in shared document library

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :SharePoint
 

I have created visual webpart ,through this webpart i am creating the folders dynamically in shared document library.

here my thing is if i create folder with specific name,want to set custom icon instead of default icon

please any one help me on this.

 

Advanced thanks

Venky 




View Complete Post


More Related Resource Links

Conditionally Change Folder Icon in document library view (SP 2007)

  

Hi All,

How can I change the folder icon in the default document library view?  The catch is, I don't need to do this across the board, instead, I need a custom folder icon based upon the individual folder's properties.

I'm aware of the file ..\Web Server Extensions\12\TEMPLATE\XML\DOCICON.XML, but that's not what I need.

My initial thought, was to find the page that sharepoint uses as the template, find the <img> src attribute, and chnage it from

src=".../folder.gif"

to something like

src="/GetIcon.aspx?fn={folderNameHere}"

my GetIcon.aspx page would then look up the folder's properties, and return the expected .gif file.  However, I don't know which file is used.

Thanks!


How to add folder from UNC to Document Library (Shared Documents)

  

Hi,

Is it possible to add a new folder to my Shared Documents (SharePoint) from my network shares? Let's say i have this \\10.238.150.94\My Pictures and i want to add this folder to my Shared Documents.

Regards.


When try to open a folder in a moss 2007 document library in Explorer View, the folder does not open

  

When try to open a folder in a moss 2007 document library in Explorer View, the folder does not open.

I am using IE7 and the path of the folder does not contains more than 100 characters.

Also it opening on few on the machines which has IE7.

Help.. 


Can i Map to external link from document library folder

  

HI

Is There any one know how to link document library folder is to external site 

 

Thanks


When i click on any other folder in the document library that will navigate to default view of DL?

  

Hi

I have document library with having some folder in the same ,i have displayed my library in the page as Treeview, so when i click on any of the folder in the library i need to navigate allitems.aspx page i.e default view page of the document library ,the document library having views.Suppose when i am in other view i have selected folder from library treeview folder is changing but view not navigate to default view.

pls help 

 


Sharepoint Workflow To Shoot Email Only When Folder Is Created In Document Library

  
Hi, Can anyone help me with the below issue, I am facing this from so long and didn’t figure out solution yet for the same. :( I want to send an email through SharePoint designer workflow only when a folder is created in document library (not file uploaded/updated event). Please provide me solution about how I can achieve this through SharePoint designer as don’t have enough coding acquaintance.

Querystring to determine what Document Library Folder's files to list?

  
First of all, any webpart that alllows you to list documents in a particular folder of a Document library? Second, possible to pass what folder to list via a query string to  that webpart ? Thanks.

List lookup to document library not showing folder names

  
Hi all, I've got a Sharepoint List, which has a lookup field to a Document Library on the same site. That document library library is populated with several folders, each with several Word documents within. I want my lookup (in the List) to only display the top level folders in the document library. I managed to do that in my test environment. But in my production environment doesn't list the folder names. I've compared the settings in the two and they look identical. What could be wrong, and how to I fix it so that the folder names appear? I'm using SharePoint 2007. Thanks in advance for the help.

Getting parent folder of a document library within EventReceiver

  

Hello everbody,

I am trying to create an EventReceiver which gives me the parent folder for currently added documents. For this reason I created an ASPX Page which I display through a "Page Viewer Web Part" on my Sharepoint. Within this Page I can create new folders in my Document Library. This is working fine. My problem is that I want to create an EventReceiver. The event is firing and I can debug it, but my properties object seems to be missing something. I am not able to get the name of the parent folder.

Is this because I am displaying my site through a "Page Viewer Web Part"? But that would be strange because I am able to write into my document list.

public override void ItemAdding(SPItemEventProperties properties)

        {

            using (SPWeb web = properties.OpenWeb())

            {

                string url = properties.BeforeUrl.ToString();

                url = url.Substring(0, url.LastIndexOf("/"));   URL is ""

 

1) Should I i

Sharepoint Workflow To Shoot Email Only When Folder Is Created In Document Library

  

Hi,

Can anyone help me with the below issue, I am facing this from so long and didn’t figure out solution yet for the same. :(

I want to send an email through SharePoint designer workflow only when a folder is created in document library (not file uploaded/updated event). Please provide me solution about how I can achieve this through SharePoint designer as don’t have enough coding acquaintance.


Regards, Sachin


How can I send a document from one folder to another folder in the same document library in a Record

  
How can I send a document from one folder to another folder in the same document library in a Records Centre?

Adding New Custom Folder Content Type doesn't show up on the Document Library New Menu

  

I been trying to add new custom folder content type to the document library programatically in my sandbox environment and it does show up on the document library. But, when I move same code to the almost similar configured SP2010 environment, adding new folder content type to the document library doesn't show up on the document library's new menu.

Here is the code? Since this code works fine in my sandbox environment, is there any other settings I should check on the server environment which would cause hiding content type on new menu of document library.

  class Program
  {
    static void Main(string[] args)
    {
      SPSite spSite = new SPSite("http://sp2010vm");
      foreach (SPWeb spWeb in spSite.AllWebs)
      {
        spWeb.AllowUnsafeUpdates = true;

        //For each site, cycle through lists
        bool isDocLibraryExists = false;
	      foreach(SPList spList in spWeb.Lists)
	      {
          if(spList.Title == "Classified Documents")
		      {
             isDocLibraryExists = true; 
          }
        }
      
        if(isDocLibraryExists == true)
        {
          //Create new doc library
          SPList splist = spWeb.Lists["Classified Documents"];

          //Create Content Type
          SPContentType documentContentType = spWeb.AvailableContentTypes["Classified Documents Folder"

Hyperlinking to individuals folder in a document library from one link

  
I have created a document library with a folder belonging to each person in our staff. I created a link in the top menu labeled "My Files". Is it possible from the "My Files" hyperlink to link directly to the folder of the individual logged in? Currently right now the link just opens the directory and the user will see just one folder which is ok but it would be neat to have it direct right to the root of their folder.

Cannot open Word document from sharepoint Shared Documents folder

  

Hey Every body

I have a very strange problem. Our Company has a Microsoft Office Sharepoint Server 2007 solution running as our company Intranet solution. 

We have a solution where outside users, can gain access to a workspace site on Sharepoint where diffrent people can work together on projects that involves both out side users and internal staff. 
We have a folder called shares documents here we can upload documents that we want the other memebers off this workspace too see.
The problem is that internal staff can open up Word documents directly, but the external users are not able to open up directly these Word documents. Word just sayes that that is is unabel to open up the word document.
But when the users download the documents instead it works fine.

I have tries with both offcie 2003 and office 2007 and the problem is the same. But if i try to open up these documens via Open Office the problem due not exits, then is works fine. Why does Microsoft Word have these problems?

And is it just when the external users are opening up the documents directly from the sahred Documens folder that we have this problem.

The external users are connecting to our Citrix Netscaller security solution for authenticating purpoes first, after they have been validated through this solution, they ar

Check if Site, Document Library or Folder exist

  

Hi All,

I need some code using the webservice to check if a Folder, Document Library or SubSite exist. The purpose is basically to check if it exists before trying to create it.

I've found that I can detect a Document Library (but not Site or folder) with this:

  • list.Url =

    "http://SharepointServer/RootSite/_vti_bin/lists.asmx";

  • XmlNode

     

    list = list.GetList("MyDocLib");

It returns some information if found one and an error (Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-

Enable/Disable "New Folder" ribbon menu in document library in sharepoint 2010

  

I am new to sharepoint 2010. I want to disable "New Folder" server ribbon menu under document library only if I am at level greater than 2 in document library. If level is <=2 "New Folder" ribbon menu should be enabled. How I should achive this enable/disable feature of existing "New Folder" menu item?    


Retreiving the url for a folder in the document library in SharePoint 2010 site programatically

  

Hi,

 I want to retreive the url for the folder in the document library using visual studio.And I also want to retreive the subfolder url.Pls help me.

Regards,

Shamia


Categories: 
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