User controls are custom, reusable controls, and they use the same techniques that are employed by HTML and Web server controls. They offer an easy way to partition and reuse common user interfaces across ASP.NET Web applications.

learn more… | top users | synonyms

9
votes
2answers
8k views

Programmatically add JS/CSS to pages

I've created a Visual Studio SharePoint 2010 solution with an ASCX that adds some JavaScript files and CSS to the head of each page; this is based on this article. When I deploy the solution, it adds ...
7
votes
2answers
4k views

How do I add a custom control to the My Site person.aspx page?

I have created a server control and want to place it in the person.aspx page on the My Site however do not want to edit the page through SharePoint Designer but want to edit the file itself from the ...
2
votes
1answer
13k views

Calling the SP.UI.ModalDialog.showModalDialog method

My SharePoint solution has a userControl that Register a js block string getJS(string title, string htmlContent) { return (string.Format(@" ExecuteOrDelayUntilScriptLoaded(function ...
1
vote
2answers
714 views

Couldn't find any way of displaying a message box in Visual Webpart 2007 (User Control)

I almost tried everything I could to display a nice message box in user control (.ascx) or code behind, but I failed miserably, Can anyone find me a tutorial in context to what I need and will 100% ...
3
votes
1answer
2k views

Customize Quick Lanch navigation

I have to create web control that can be placed to master page. This control should display Quick Launch navigation from web that is defined in control properties. Also this page should contain own ...
3
votes
4answers
711 views

Which is Better a UserControl or WebPart?

What are the advantages of user controls over WebParts when dealing with SharePoint? Some I can think of are: familiarity, reusability, and development speed. I am planning to implement them in ...
2
votes
1answer
173 views

How to upgrade a Visual Studio Project from SharePoint 2010 to SharePoint 2013 (VS 2010 to VS 2012) - For WebParts, MasterPage, AppPage, User Controls

We have a SharePoint 2010 project solution which we are trying to uprgade to SharePoint 2013. This includes webparts, application pages, user controls, masterpage, etc. Foll. is the procedure we ...
1
vote
2answers
191 views

Creating Custom List Forms for Creating, Editing, or Displaying a List Item

I'm following this article (as well as different MSDN pages) and trying to add some custom template forms to my content type. I think I'm doing all by the book, but for some reason wont deploy my ...
0
votes
3answers
2k views

How can I access Controls in VisualWebPart1.cs from UserControl.ascx

I make a Webpart and want to use the controls from the VisualWebpart1UserControl.ascx in the VisualWebpart1.cs. Is this possible? I wrote following code in the VisualWebpart1.cs: ...
0
votes
3answers
522 views

Webpart properties getting empty after IIS Reset

I created a custom visual user control webpart property for my SharePoint webpart. The property has a textbox which is getting empty after an IIS reset. Can anyone tell me how to solve this issue ...
0
votes
2answers
3k views

Adding multiple controls to AdditionalPageHead

My question is regarding the delegate control AdditionalPageHead, as we know it allows multple controls to be loaded. My questions are: How to add multiple controls? I want that the different ...