C# - How To Make A Webparts Settings Configurable In Sharepoint
Jan 4, 2010
I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I am publishing a portal template.
I want to develop a WebPart and make some settings configurable (just like we can configure parameters for a console application in app.config)
For example, authorized users could set parameters of WebPart in Edit Page (from browser based UI interface), then Select -> Modify WebPart properties, or edit parameters in SharePoint Designer.
The parameters would be application specific parameters.
In the above code i am setting the transactionOption ie: IsolationLevel, timeout inc code
1) How to make the transactionOption Configurable ?
2) I checked some forums the timeout problem occurs how to solve that ?
3) Whether the Transaction should use only when there is a transaction take place (ie: payment ) , for example can I use the TransactionScope to Insert some value to Database ?
My ascx is pretty big & I'd like to reuse it, changing controller/method in Html.ActionLink with another controller/method. Method of another controller has the same signature as PersonController.Publications. Whats best way how to make controller/method configurable for my layout.
I'm looking at asp:webpart to implement some personalization on a startpage for a insurance web app.(no Sharepoint) I have read some and made some tests but I have at least one thing that I don't understand.
In some cases I wanted to reset all users personalizations to the page default settings. So to speak, I will do it in an authoritarian way.
How can I do this? Database manipulation? Which table in the database? Or is there another way?
i installed dotnetnuke in my system, installation is completed successfully, now i want to change skin settings according to my requirement like changing colors,font,logs like that can u help me how can i do this in dotnetnuke.
We inherited some code that makes use of a web service on an external server from a third party. Currently all the references are done in the project directly and thus compiled to that location and such. This issue we have is that there is a test and production server for the web service with different URLs.
Is there a simple means to make the web reference more dynamic so that it can be defined in a web.config and not require changing the actual source and recompiling to switch between servers?
I want to make my visualwebpart to communicate with other webparts like (Provider and Consumer) I am thinking can I make my VisualWebPart which has a ascx file which is drived from UserControl, can I make it a Provider or a Consumer. I am adding these webparts on Sharepoint 2010 webpartpage.
I have deployed a custom SharePoint Web service on Farm A. I am trying to access this Web service from a SharePoint timer job on Farm B. On Farm B, I am creating Class Library project, packaging it (wsp) and then deploying to GAC. The problem is I'm unable to access the Web Service using the following code. TodaysNewSVC is a service reference
//getNewsFromInsite is a WebMethod which returns the DataTable.
Note: Both farms use the same active directory authentication. I have also done the debugging for Timer Job and feature activation and they are working fine. The problem occurs during the call i.e. getNewsFromInsite The asmx and wsdl files are accessible from Internet Explorer and also from Windows Console application. Here is the code which I use from console application:
GetTodaysnewsfromInsiteSoapClient objWSClient = new GetTodaysnewsfromInsiteSoapClient(); objWSClient.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;[code]...
Here is the error message:The request failed with the error message: -- <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="%2fPages%2fproblem-with-page.aspx%3fc%3d500">here</a>.</h2> </body></html>
We have many different clients, and each client can have multiple user accounts.Right now, we have user settings set up on the ASP project, and a WinForms application can see these settings, depending on which user logs into the winforms application. They are specific to the user. I want to make them specific to the client, so users can be in "groups" by their client, and all users in the group would see/update the same settings.
Following error comes when creating a WebPart In sharePoint 2010 Server.
Web Part Error: Unhandled exception was thrown by the user code wrapper's Execute method in the partial trust app domain: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.TypeLoadException: Could not load type 'Microsoft.SharePoint.WebControls.SPGridView' from assembly 'Microsoft.SharePoint, Version=14.900.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. at ListMenuSample.ListMenuSample.ListMenuSample.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper.ExecuteHttpRequest(SPUserCodeWebPartHttpRequestContext webPartExecutionContext, SPUserCodeWebPartHttpResponse httpRequestResponse) at Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper.Execute(SPUserCodeExecutionContext executionContext) at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext executionContext)
once have closed a webpart when i am running my application again it is not displaying the webparts...i have to place my code in to other webpart. to prevent from creating the webpart again an d again...
I started learning ASP.NET these days. Google Chrome is my default browser and I'm also testing my applications in Google Chrome.
I recognized that some Elements of ASP.NET won't run in real time when I use Chrome. For Example ASP.NET WebParts. If I change the modus of the WebPartManager from default to edit (or something else), Google Chrome needs 1 - 2 seconds to renew the page. Internet Explorer does this in real time without any loading times.
I'm a rookie in ASP.NET and many people said, Microsoft's AJAX for ASP.NET is some kind of crap. I'm using Visual Studio 2010 and maybe you'll say, I should use jQuery instead of internal Features like WebParts.
I have followed this link and it seems to work in the sense that it adds webparts from my XML file successfully.
[URL]
However, the actual controls themselves are never displayed and their respective page loads are never called.
The controls themselves work fine if I hardcode them into the catalog zone and inherit them from user controls but when I change their inheritance to webpart and try and use the control from this example, as mentioned nothing appears. Clear as mud?
An example of a control -
public partial class hello : WebPart {} <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="hello.ascx.cs" Inherits="Controls.HomePage_Controls.hello" %> <asp:Label ID="lbl1" runat="server" Text="Hello" Font-Bold="true" Font-Size="Large" ForeColor="Blue" />
I use Visual web developer express 2010, with sql server express.
I followed all the instruction to build a simple page with webparts. I added the webpart manager, webpart zone, zone template and added my user control or asp controls inside.
The webparts look as they suppose to in design view, but when I run the application and see the page in the browser (explorer 8 Or Chrome) the webparts look like cells in table: Static, with no menu that will allow the user to minimize or to close the webpart. None of the webparts have the small triangle menu icon.
i created a webpart in default.aspx page. i am trying to access the html code of the default.aspx page from an html file using javascript. When trying to access a javascript error is displayed 'webpartmanager' is undefined. the functionality i am trying to achieve is i want to call all the webparts created in default.aspx page from html page and do all the drag drop, minimize, close in html page.
I'm developing an ASP.NET (C#) application using EPiServer CMS 5. On the startpage we have four WebPart-zones and everything works great running it through Visual Studio. When publishing it to the production-server (IIS 7) the startpage shows as a blank page, no error what so ever...
When we remove these lines of code it works, so it has something to do with the WebParts.
I have a classic ASP application which is using SQL Server 2000. I am trying to add a .NET web page into the ASP application. In the .NET Page(using C#), I am trying to use webparts.I would like to know, if the ASPNETDB can be created in SQL server 2000 to store the personalizations, and is there any other changes to be made to use web parts in an ASP application?
I have created a web part in asp.net application and allowed user to change it position. Now, I want that once user comes back he/she will see the same setting of web part that he/she had left earlier.What is the best approach to maintain the web part position for that particular user.