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

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

Visual Web Part help

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :SharePoint
Hi, I followed through the article posted here(http://msdn.microsoft.com/en-in/magazine/ff797985(en-us).aspx) to merge the documents using "Word Automation Services" When I deploy the Solution and Click "Merge Documents" I get a Error. The Error reads: "File Not Found. Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close webparts or remove personal settings. For more information, contact your site administrator". Did any one experience same problem? Any help is greatly appreciated.          

View Complete Post

More Related Resource Links

Sharepoint 2010 power tools visual sandboxed web part issue!!


Hi guys

I tried to use a simple hello world web part with with sharepoint power tools the solution is added ok but when I try to add the web part to the page I get this error "Unable to load assembly group. The user assembly group provider...." Any thoughts






How to Fire events on SharePoint DateTime Control in visual web part

Hi All, I am working on visual webpart of SharePoint 2010. I am using a <SharePoint:DateTimeControl> i m trying  to fire OnDateChanged event on it. I am not getting the Appropriate way to create the event. please help me out!!!!   void ToDate_OnDateChanged(object sender, EventArgs e)         {                         if (ToDate != null)             {                 DateTime min = Convert.ToDateTime(FromDate.SelectedDate.ToString());                 DateTime max = Convert.ToDateTime(ToDate.SelectedDate.ToString());                 int noofdays = Convert.ToInt32((max - min).TotalDays);                 txtNoOfDays.Text = noofdays.ToString();             }         }    <SharePoint:DateTimeControl runat="server" Calendar="Gregorian"  

Using Web Service in SharePoint 2010 Standard Web part using Visual Studio 2010

Hi All,               Have an issue with  Web service in calling  by SharePoint 2010 Standard Web part using Visual Studio 2010. If you can tell where I went wrong or tips to solve this would be great for me. What I have done is like this.. 1) Created new 'Empty SharePoint' project : as Farm solution 2) Added Web parts 3) Trying to add Web Service : There was no option for adding Web Service , so added as 'Add new Service' , this created entries in app.config file 4) ServiceName : shown as name space  (what  I'm  expecting is as Global  object with all methods ) 5) Created Object of namespace.ServiceName.ServiceSoapClient and tried to call one of it's method 6) Build and deployed 7) While viewing that web part it is showing an error as [InvalidOperationException: Could not find default endpoint element that references contract 'SerialKeyService.ServiceSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.]         Error in detail : [TargetInvocationException: Exception has been thrown by the target of an invocation.]   at System.RuntimeTypeHandle.CreateInstance(RuntimeType t

Inserting List Item values from a Visual web part

Hi Geeks, I am struck here with one situation that is: 1) I created a enquiry list. 2) Then I created a visual web part it contains the same fields as enquiry list  as textboxes for entry. If any body enters the data and click submit. Those data must be reflected into the enquiry list. Please enlighten me how can I do this.   Thanking you.

Visual Web Part Deployment

I have Visual WebPart that developed using VS 2010. Now I want to deploy that web Part in different server. There VS 2010 is not installed. When I using the command "Package" in VS 2010 one .wsp file is created in bin folder. But using that .wsp I can't do the following task: 1. Add safe control entry. 2. Place .ascx file in "Control Template" folder. can anybody tell me what is the process of deployment in VS2010 and SharePoint from One server to another. In VS2008 one setup.bat file was created that I can use for first time to create safe control entry and other staff but there is no so such file is created in VS 2010. Can anybody halp me on that.  Thanks tat --- Follow me @ http://moss-inside.blogspot.com/

Install of wsp solution for visual web part ... how?

I have a newbie question -  I created a visual web part project that has a visual web part and an application page. It works well and deploys without issues on my all inclusive local environment using the deploy feature from VS2010. So to deploy this to the live server, I grabbed the .wsp file from the bin folder. Copied the file to the server and ran the following commands -   add-spsolution D:\MyWspFile.wsp Install-SPSolution -Identity "mywspfile.wsp" -WebApplication http://sp2010 -GACDeployment Both these steps work fine too. Then I go into the site features page to look for this solution but its name is not there (should it be there?). Next I go to the page I want to add this visual web part to but it does not show up in the list of web parts. The Timer job page in central administration shows the deployment as succeeded. What am I missing here? Thanks in advance, Jake.  

Error code -2068578304 When Installing Express SP1 x64 as a Part of Visual Studio 2010 Installation

Howdy! I was installing the VS 2010 on my server running Windows Server 2008 R2 x64 and all of a sudden the setup finished with " Setup completed, however, there were failures reported installing optional components. " The final status is success. The left-hand pane of the finish page reads as: The following component failed to install: Microsoft SQL Server 2008 Express Service Pack 1 (x64).   Leaving alone the fact why setup executed the custom action that tried to install SQL Server Express Edition and Compact Edition when I just asked it to install SQL components (which presumably should be SQL SMO and DMO libraries), I would like to understand what had happed to Express install.   Inspecting the .\Logs\dd_error_vs_vstdcore_100.txt file gives the following record:   [09/16/10,16:06:51] Microsoft SQL Server 2008 Express Service Pack 1 (x64): [2] Error code -2068578304 for this component is not recognized. [09/16/10,16:06:51] Microsoft SQL Server 2008 Express Service Pack 1 (x64): [2] Component Microsoft SQL Server 2008 Express Service Pack 1 (x64) returned an unexpected value. ***EndOfSession***   Further inspection of the dd_install_vs_vstdcore_100.txt provides with the info:   [09/16/10,16:02:51] Microsoft SQL Server 2008 Express Service Pack 1 (x64): GenericComponent Action: CreateProcess launched with cmd line : x:\setup\..\wcu\sse\SQLE

Sharepoint 2010 Visual Web Part - Personalizable


I have a visual web part which has 2 public properties

One is webbrowsable and the other is not.

I can retreive the data from the properties into the usercontrol and display them, but i'm unable to update the value and store it against the webpart, just as i would from the editor section.


Here are my 2 public properties.

 <Personalizable(), WebBrowsable()> _

    Public Property myString() As [String]


            Return m_myString

        End Get

        Set(ByVal value As [String])

            m_myString = value

        End Set

    End Property

    Private m_myString As [String]



    <Personalizable(PersonalizationScope.Shared)> _

    Public Property myStoreage() As [String]


            Return m_myStorage

        End Get

        Set(ByVal value As [String])


Visual web part


Hello ,

 - could I know what the advantage of Visual Webpart ?

- And what is the difference between webpart  and Visualwebpart ?

- is that good the .ascx file of webpart put in the following path "\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14 \TEMPLATE\CONTROLTEMPLATES" ????

  what is the benifit of putting this files in this path  instead of putting in the "UserControls" folder of the site ?



Custom web part properties are not saved in SharePoint 2010 visual web part


I have created my first visual web part in SP2010.  In 2007 version I didn't use user controls so all of my code was in a single file for the most part.  Now I've separated out the code.  Everything works great and I like this a lot better (more like traditional ASP.NET development) with one exception.  In my bootstrap .cs file (I call it that because it does nothing but load the user control file) I put all of my custom web part properties.  Then in my web part code-behind I reference them thru an instance of the containing class.  I must have something incorrectly configured because none of the changes to the properties at runtime are getting updated in the code.  Here's a filtered view of how I have it wired together:

Sample property in the top level .cs file:

private string m_ImagePath = "sites/myapp/images1/branded_image.png";
   WebDisplayName("Relative path to header image"),
   WebDescription("Relative path to header image"),

Get context to a control in web part from visual user control


I have a Visual Web Part (lets call it "ABCWebPart").

I'm attempting to create a connection to another web part which means I have to create the ConnectionProvider in the WebPart class (ABCWebPart.cs).

The value I want to set in my AJAX provider interface is a control I created in my visual user control (ABCWebPartUserControl.ascx).

How do I get the context of the TextBox control from my Visual user Control in order to assign it's value into the AJAX provider interface?


Thanks in advance,

- Eric

Visual Web part with embedded User Control, fields are null


I have a legacy ASP.Net application that consisted of a series of ascx user controls which I am attempting to convert into visual web parts.  

I have wrapped each ascx in its own visual webpart and deployed to my site. Within my site I am able to add some of these to my pages and they render properly.

The ones that I am having difficulty with are those ascx user controls that have a child reference to other custom user controls.

For example I have CustomerinfoUserControl.ascx that has many fields within the control, but one is also a custom user control to select the date called DatePicker2UserControl.asx

Here is the declaration within CustomerInfoUserControl  and usage …



Deploying Visual Web Part with Custom Server controls


I created a Visual Web Part with VizStudio 2010. In this web part I have a custom server control that exists in a project I added to the solution.


When I deploy from the menu can I tell Studio to deploy the Custom Library or do I install that manually?


It builds fine, but when I add the web part to a web part page I get an exception that the assembly cannot be found.

Slow performance calling an Web Service in a Visual Web Part



I'm developing a report from data being served from a web service in SAP (through PI). I used the wsdl.exe to create a c# class and a wrapper and everything is working fine.

The problem is the performance... it takes about 3x the performance of an console application just to move the code inside a Visual Web Part.

I isolated the code to just this... 

DateTime timeReq = DateTime.Now;
response[] t = werbService.method(req);
double timeTaken = DateTime.Now.Subtract(timeReq).TotalMilliseconds;

It takes 60 seconds in a Visual Web Part and the same call in a console application takes 20s.

Since i dont have a packet sniffer i'm not sure why is taking so much time to execute the same code in sharepoint, am i missing some configuration? Anyone have face this kind of behaviour before?


Visual Web Parts - programmatically change Web Part Title not working



I have four custom made Web Parts (based on the Visual Web Part template) that show a filtered set of data from various lists. These work just fine on my front page (which is a Publishing enabled page/site). Each Web Part has some functionality for setting a date filter on the set of data. Now, on every load I generate a string which tells what the current filter is (default filter, custom set date filter +++) and set this string to the Web Part's Title. This text then shows up in the Web Part's header. All this works just fine on the front page.
However, I also have a few sub sites that are based on either the Blank Site or a Team Site and on these sites setting the Web Part's Title property doesn't work. Well, it works, but doesn't get rendered. If I do a "Edit page" or go to one of the Web Part's properties, all the Web Parts' headers get updated to the correct text. But, the next time I load the page, it's back to some old value. 

I dont' get it! Does anyone know what might be causing this?


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