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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Where to find (or how to make) OOB WebPart CDATA xml for onet.xml file

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :SharePoint

When you are attempting to add Web Parts in Modules to an onet.xml file, what is the best way to find (or make) the appropriate xml information that goes inside the <[CDATA [ ]]> element.

In particular, I'm trying to add the "Shared Documents" webpart, but from the sts (OOB Team Site template), the onet.xml does not have it listed (or is the oob template for Team Site not "sts"?).

But in general, how do you get this info for customizing web part include referencs in an onet.xml?

View Complete Post

More Related Resource Links

how to make a css style background image be linked to an image in the resource file


hey guy, i need help in a very troubling matter. I want to make a textbox with a specific style, within this style a set of images as background parts, how can i attach these images to the custom control as whenever i take the .dll file and add it to the toolbar the images do not appear. So i tried to make them as resource files and their property as embedded in .resx file, so how to make the css style background image url to be linked to any of those image.

thanks in advance

Make sure that the class defined in this code file matches the 'inherits' attribute, and that it e


Here is the page directive for the page that throws the error:

@ Page language="c#" Inherits="University.AspNet.Index" CodeFile="Index.aspx.cs" %>

The code behind file Index.aspx.cs starts like this:

using University.Framework.UI;

namespace University.AspNet

public partial class Index : University.Framework.UI.HomePage

The code behind is extending this HomePage class, which is in turn an extenstion of another class University.Framework.UI.Page, which extends the System.Web.UI.Page class.

Am I misusing the I

Cant find vsi file for CSS Friendly Control Adapters


Hi guys

This is driving me crazy... I cant find the .vsi file for installing the CSS Friendly Control Adapters Project. Does anyone know where I can get this?

The following link: http://www.asp.net/cssadapters/ only leads to the CodePlex wiki where I can download the dll and a partial solution. Essentially, I'm looking for the source code to implement the Menu adapter.

Any help is much appreciated!

Programmatically delete a .webpart file from wpcatalogs folder from an IIS website


We are using a third party wsp in our solution which directly adds the web parts into the web application store rather than the web part gallery(References to them are present in IIS site's wpcatalog directory). We want to remove these web part files so that the users will not be able to add these web parts to pages directly. Or any other modification so that users will not be able to add these directly. Is there a way we can do this programmatically?

How do I find the file path from a namespace.class name?


I'm programatically looking ito a .aspx file and getting the file class name declared in its CodeBehind. For example, when analyzing myFile.aspx I read in its Page Directive and found its CodeBehind equals "myApplication\myPage.aspx.vb". Then I use the code below:


Dim Assm As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom("myApplication\bin\myApplication.dll")
Dim ClassType As Type = Assm.GetType("myApplication\myPage.aspx.vb")
' myBaseType = "myApplication.Forms.BasePage"
Dim myBaseType As System.Type = ClassType.BaseType


Now I want to read the BaseFile (class = myApplication.Forms.BasePage). However, to read in this file, I need I need to get its full path instead of its namespace.class hiearchy. In this case, the BasePage is wrapped in a different namespace declaration thus I cannot just change the '.' to '\' in order to get the path.

How can I get the path of BasePage so I can read it? Thank you - Frank

Error: Do you want to save this file, or find a program online to open it?



I am relatively new to MVC , i am getting the following error when i try to browse to a page in which i have used usercontrol and within the usercontrol i have a simple grid.

Error: Do you want to save this file, or find a program online to open it?

I am returning the data from the controller like this

 var jsonData = new
                    total = 1,
                    page = 1,
                    records = myRequests.Count,
                    rows = new[]{myRequests.ToArray()                 

TSWebAccess Webpart can't find Terminal Server


a. Windows Server 2008 with TS Web Access installed and MOSS 2007

b. Windows Server 2008 R2 in Remote Desktop Services installed and configured.

The SharePoint web part is installed and I an add the web part in the site. But when I try to add the terminal server name I get:

TS Web Access was not able to access the specified terminal server. Verify that the computer account of the TS Web Access server is added to the TS Web Access Computers security group on the terminal server.

Any ideas why this is happening.  I saw other threads with the same error and no answer yet, so I guess I'm not the only one having the problem.




Costas Tsaklas - http://costas.cpstechgroup.com

Creating a new root Site Collection using a custom site definition file (ONET.XML)

Using Powershell, I am trying to deploy the our custom solution to SP 2010.  The script is doing the following: Deleting the web application using Remove-SPWebApplication Creating a new web application using New-SPWebApplication Adding and deploying a series of WSP files (one of which has the site definition file in it) using Add-SPSolution and Install-SPSolution Create a root site collection based on the site definition file provided in the WSPs using New-SPSite I get the error "WARNING: Template is not found and is not applied." When I run Get-SPWebTemplate, my site definition does not show up. I saw this: http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/5ea46e07-a4b0-4bab-b698-9b6eeb695607 but I want a solution that does not involve me reloading a DLL, as, I feel there is something else I am forgetting. I have also tried: IISReset Resetting the timer service Cleaning the Cache (as described here: http://support.microsoft.com/kb/939308) Nothing seems to work.  Does anyone have any ideas?

How to localize a .webpart file?

Hi I just got handed a project from another developer and now I need to localize a set of existing .webpart files. My idea was something like : <?xml version="1.0" encoding="utf-8"?> <webParts>     <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">         <data>             <properties>                 <property name="Title" type="string">$Resources:TestWPRes,WPDefTitle</property>                 <property name="Description" type="string"></property>              </properties>         </data>     </webPart> </webParts>   However, Having the resource file in 12\Resources does exactly nada. Not even an error message. When displaying the "$Resources:TestWPRes,WPDefTitle" . Now where did I go wrong and how do I fix it?

Make a webpart properties customizable only by an Administrator

I am developing a sharepoint 2010 visual webpart that will show some sort of ajax content. I have a property on the webpart for the refresh rate, but I want this property to be set only by an Administrator (or any specific group). What is the best way to achieve this? Thank you.

SSIS throws error when it doesn't find file

Hello All, I am facing one issue that i dont know in advance if there is file on FTP or not. I scheduled a job which runs every hour which in turn calling SSIS package. Now, when there is file on FTP, it works fine. But, when there is no file on FTP then itthrows error which i want to handle. Is it possible to check for any files present on FTP? Cheers, Pranav

Error: 0x80070002 The system cannot find the file specified

From Windows Server 2003 Std Ed SP, 32 bit VMWare Virtual Server .Net Framework v1.1.4322 When attempting to run a hello world aspx page it fails to load returning the message "Server Application Unavailable".  The application even viewer logged the following: Event Type: ErrorEvent Source: ASP.NET 1.1.4322.0Event Category: NoneEvent ID: 1088Description:Failed to execute request because the App-Domain could not be created. Error: 0x80070002 The system cannot find the file specified. I tried to run aspnet_regiis.exe -i, rebooted but this did not work. I tried to uninstall, reboot, reinstall .net from the Windows component section of Add/Remove Programs. Does anybody have any ideas? thanks, MP

find and replace linebreaks in file read from disk

I have a css file which I want to read from disk and in that content I want to find and replace all linebreaks (do I look for vbCrlf or ...?)   Public Shared Function GetFileContents(ByVal FullFilename As String) As String        Dim filecontents As String = ""        If File.Exists(FullFilename) Then            Dim objStreamReader As StreamReader            objStreamReader = File.OpenText(FullFilename)            filecontents = objStreamReader.ReadToEnd()            objStreamReader.Close()        End If       Return filecontents    End FunctionSo in the returned variable "filecontents" I want to find and replace any linebreaks.        FILE: style.css#progress{color:#000;width:500px;height:30px;padding:0px;clear:both;}#progress ul{list-style:none;padding:0px;margin: auto;display:block;}#progress ul li{list-style:none;display:inline;float:left;width:auto;height:30px;padding:0px;line-height:30px; font-family:Arial, Helvetica, sans-serif; font-size:13px;}

i make a web site using frame but session is expire Error message is my Config file is attache

i make a web site using frame  but session is expire message is Object reference not set to an instance of an object Description: HTTP 500. Error processing request. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000] in <filename unknown>:0 at System.Web.UI.Control.LoadRecursive () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.ProcessLoad () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.ProcessPostData () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.InternalProcessRequest () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0 My Web Config file is<configuration>    <!-- store the database connection info here -->     <appSettings>        <add key="sBook_StoreDBConnectionString" value="Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\Program Files\CodeCharge\Examples\BookStore\BookStore_MSAccess.mdb;Persist Security Info=False" />            </appSettings>  <system.web>  <httpRuntime executionTimeout=&quo

Search cannot find contents of the PDF file

I have small SharePoint 2010 Server with 2 servers. Steps I made: 1. I have Downloaded and installed Adobe’s 64-bit PDF iFilter to the Front-End machine 2. I have downloaded Adobe PDF icon and inlucluded to the DOCICON.XML. 3. I have added PDF as supported file type 4. I have restarted IIS 5. I have made full crawl 6. Crawl log showed no errors. All items were succesfully crawled. Results: A) PDF icon displayed b) Search based on PDF document name works fine C) Search based on words inside PDF document is not found. What should I do? Reference: http://www.sharepointsharon.com/2010/03/sharepoint-2010-and-adobe-pdf/Kenny_I

view mht file in page viewer webpart

Hi, I use infopath template to publish weekly news to our corporate intranet. On my sharepoint 2007, everything work fine. but on my SharePoint 2010, it's not the same result. I have upload the template on my site. Create the news and save it. At that point it's good. Next, I open the xml file in InfoPath 2010 and export to web as mht file. Then on my site home page, I add webparts "Page Viewer" and paste the link to see this mht. The problem is when I go on the site, it's always a pop-up ask me to download it (Save or Cancel). I'm not able to see it in the page. On my 2007 it's work fine. Did someone have any idea to resolve my problem ? MOSS 2007 IIS 6 windows 2003 MOSS 2010 IIS 7 Windows 2008 x64 SP2 Thx to allDavid
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