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

2
votes
2answers
1k views

Tutorial for displaying a MessageBox in a WebPart [duplicate]

Possible Duplicate: Couldn’t find any way of displaying a message box in Visual Webpart 2007 (User Control) I have been working on SharePoint 2007 for more then a year but still don't have ...
0
votes
1answer
332 views

How do i add a UserControl to a VisualWebPart (sandboxed)

I have installed Visual Studio power tools so that i can add Visual Web Parts. This all works fine, i can deploy Visual Web Parts etc. I now want to create a UserControl in my solution which i can ...
1
vote
2answers
3k views

Can a user control be added to a Visual Web Part?

Can i add a user control to a Visual Web Part (in visual studio) in sharepoint 2010? I have a user control which has content that i want placed on most of my visual web parts. Has anyone got any ...
0
votes
1answer
79 views

Getting resources in a Visual Webpart

I want to get resources that are kept at directory in my visual webpart "User Control" for SharePoint 2007: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources At the ...
1
vote
1answer
830 views

SharePoint 2010 ASCX Edit withou WSP Deploy?

I have deployed an ASP.NET control in a wsp package. I would like to add some custom JavaScript and HTML to the .ascx file. Nothing that would need a recompile and re-deploy. Where is the actual ...
0
votes
1answer
193 views

Correct way to use the people picker and Rich Text

I'd like to have a custom form that lets me add items to a list. There are two fields giving me trouble. One is a "Moderators" field which will use a people picker. The other is a "Body" field, ...
0
votes
2answers
288 views

Cross Browser Rich Text Editor Control

I may be going crazy over here, but I cannot seem to find a Rich Text/HTML control for SharePoint 2010. I have successfully implemented an InputFormTextBox, but this only shows up in IE. I've tried ...
0
votes
1answer
142 views

When placeholder is filled with content from page in master page

My question about the placeholder, basically I have to perfrom a check in my custom user control for some controls, but does controls are loaded from a page in a placeholder. And my user is located ...
1
vote
1answer
751 views

User control in delegate control

My question is regarding a delegate control called TopNavigationDataSource, normally when you create a delegate control you just define there some new properties etc. But what if I want to deploy ...
1
vote
3answers
4k views

Create SP People Picker on the client-side

I would like to know if there is a way to generate a SharePoint 2010 People picker control just with JavaScript. Imagine that I am doing a Windows 8 App, I would like to create that control ...
1
vote
1answer
118 views

why sharepoint doesn't look into sub-folders for control templates by default

I wonder why sharepoint doesn't look into sub-folders of control templates in 12 hive, even tho by default its suppose to. I googled and seen people loading it from custom location in there code but ...
0
votes
1answer
2k views

SharePoint List form buttons and &Source on Cancel and Close

If I don't SharePoint Designer customize List newform, editform and dispforms, can I still use my own button outside of the webpart to submit data from the form. Say I'm using CSS to hide the ...
0
votes
1answer
69 views

Design considerations for uploading documents into MOSS 2007

I am working on a design document for one of my projects in MOSS 2007. There is a requirement to create a custom interface to upload document along with metadata to a document library. I am not sure ...
0
votes
1answer
391 views

Delete a user Completely in SharePOint 2010

Is there a way that when an administrator deletes a user from a SharePoint group the user can be totally deleted .Presently when an admin deletes a user from the group he can still see the user in the ...
0
votes
2answers
2k 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 ...
0
votes
1answer
292 views

GetLocalizedString in CreateChildeControls returns source string

I have a strange issue ... I want to retrieve resources programmatically from a SharePoint default resource file wss. So in one of my controls im executing the following code: protected override ...
0
votes
1answer
283 views

How to keep PlaceHolderPageTitle without removing them when prompt with 'The page has one or more <asp:Content> controls…'

I have the following error prompted when opening a aspx page in SharePoint Design view The page has one or more <asp:Content> controls that do not correspond with <asp:ContentPlaceHolder> ...
1
vote
2answers
181 views

Registering all templates in folder /_controltempaltes/custom

I have a question regarding the directives in the MasterPage. So if I deploy a custom template to ControlTemplates in SharePoint folder, to use it I will need to write a directive which imports that ...
1
vote
0answers
402 views

Adding/removing items to/from a DropDownChoiceField

I can't seem to manipulate the items displayed in a DropDownChoiceField I have that's tied to a field on the custom content type with big, really frustrating problems. This field is only visible in ...
3
votes
4answers
575 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 ...
1
vote
1answer
98 views

How to upgrade user controls on Development Server

I just came across User Controls developed by developers who left company now, I tried looking on google on how to upgrade them on development server but couldn't find any blog or post regarding it. ...
0
votes
1answer
253 views

How to change UI of EntityEditorWithPicker?

I have created a custom EntityEditorWithPicker control. And now I need add TreeView control at the left hand of the PickerDialog, when it is shown. But I can't found how to get an instance of ...
0
votes
1answer
226 views

What is Site Content and structure in Sharepoint Online and what it is used for or how to create a site structure?

1.What is Site Content and structure in Sharepoint Online and what it is used for or how to create a site structure? Please provide me some good links or videos on activating and using it. I searched ...
1
vote
1answer
2k views

Customizing SmallSearchInputBox default text

I am trying to customize the text displayed in the search box of my SharePoint site. The default is "Search this site...". I found a number of articles which explain how to do it (by overriding the ...
2
votes
3answers
4k views

Custom master pages used in multiple SharePoint 2010 sites

My company has just stated using SharePoint 2010 and I have been tasked with adding some custom functionality to the master pages - essntially we just want a global top navigation bar that contains ...
3
votes
1answer
213 views

How to migrate c# application to Web Control to use in SharePoint application

I have created C# application which use Microsoft.SharePoint Namespace. That Application let the user to select the wiki page and available anchors inside that wiki page. Now I migrated that C# ...
1
vote
1answer
1k views

Usercontrol RenderingTemplate and Code behind

Can I use code-behind in RenderingTemplate? It's not possible to just use code-behind like using it in an application page. What am I missing to use my own code inside a RenderingTemplate
0
votes
1answer
170 views

Render web-part insinde control

Is it possible to render a web-part inside of a control? I have a webpart with a certain functionality which I want to re-use on a different page-layout directly. The first idea would be to extract ...
0
votes
2answers
428 views

Beginners question regarding code-behind for aspx pages

I've been studying sharepoint for a matter of days now so please bear with me if I'm missing something really obvious. I've followed a couple of guides that have got me familiar with the process of ...
1
vote
1answer
66 views

Is it possible to write a feature to inject a custom control into a masterpage?

I have 3 site collections that need a specific css file, and to not have to make changes in multiple places our team has opted for a single masterpage. Instead of creating a second masterpage with a ...
2
votes
1answer
11k 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
1k views

SPCalendarView control, same events are displayed each month in a VisualWebPart UserControl.ascx.cs file

I am creating a custom SharePoint Calendar to pull from multiple SharePoint Calendar Lists. In the markup I have the following: <SharePoint:SPCalendarView ID="EventsCalendar2" width="100%" ...
3
votes
1answer
377 views

SharePoint List items, UserControls and cookies

I have another task at hand. I need to use cookies to read a title of an item from a custom list in SharePoint. This task is for SharePoint 2010. I have a container set up that will display the ...
1
vote
2answers
3k views

Dynamically add controls to webpart without Postback?

Is it possible to dynamically add controls to a webpart without having a postback for example with AJAX/Java Script/jQuery/Partial Postback within SharePoint? I'm searching for some kind of ...
1
vote
1answer
939 views

Infopath 2010 “Get choices from fields in this form” combo box is read only. Why?

I created an Infopath custom form and I want to have a combo box that retrieves its data from other fields in the form (user fills a repeating group in View 1 and then in View 2 I want to display the ...
2
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 ...
0
votes
1answer
200 views

InfoPath custom forms - Dynamically create controls in the form

Is it possible to dynamically (at runtime) create controls in an InfoPath form? Some background: I have a list for which the new item is a custom form created with InfoPath. It contains some ...
1
vote
1answer
1k views

What date picker controls are available to enter a date range inside a custom web part?

I have a custom web part that executes a SharePoint search query and displays the results. I'd like to add controls to the web part so that users can select a date range (ie. start date and end date) ...
1
vote
2answers
185 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
1answer
148 views

Error when publishing page that has a custom user control on it

I have a custom user control which is a "subscribe form". The user enters name, email etc and selects values from dropdowns I data bind from lists. I can view the page no problem and use the form but ...
5
votes
3answers
1k views

.Webs and anonymous access?

We're developing a public facing SharePoint site so it have anonymous access. To be able to run custom web parts that access lists/libraries we need to run with elevated privileges which works fine, ...
0
votes
2answers
2k views

When should we call EnsureChildControls()

According to Microsoft,The EnsureChildControls() method is called in order to make sure that child controls have been created. I see many developers call EnsureChildControls() in ...
0
votes
1answer
573 views

Custom link button - image dissapearing after updatePanel reload

I created a custom link button control so it can display also an image. Code below: namespace SharepointTools.Controls { [ToolboxData("<{0}:CustomImageButton ...
4
votes
2answers
471 views

Opening a document in read-only mode using an external control

I have a .Net application that (amongst other things) provides a front end to a sharepoint document library. Users are able to open documents, and I use the Open Documents Control to do so ...
4
votes
3answers
417 views

Manage some state inside a Sharepoint WebPart

Considering a simple example of a webpart that adds items to a list based on a simple button click: public partial class MyVisualWebPartUserControl : UserControl { private int cont = 0; ...
1
vote
4answers
1k views

ASP.Net Validators part of Custom control in WebPart

Custom control has 6 buttons in which 5 of them have CausesValidation = false, the one remaining button ( lets calls it as "SUBMIT") which cause validation. Edit: Validators and Submit button are ...
4
votes
2answers
560 views

Reuse the MiniContactCard from People Matches in SharePoint 2010?

Is the mini contact card, as seen in the People Matches section of a standard SharePoint 2010 search results page, a reusable component easily applied elsewhere? It has all of the bits we want to use ...
9
votes
2answers
7k 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 ...
3
votes
1answer
2k views

How to import external javascript in a User Control?

I have a code-behind User Control (myUserControl.ascx and myUserControl.ascx.cs) that are in ControlTemplates/MyFolder/ and, in the code of myUserControl.ascx I need to use some javascript ...
1
vote
2answers
3k views

How to add code-behind to a User Control?

I have a User Control (myUserControl.ascx) with the code: <div id="content"> TEST USER CONTROL <div> that is called from a webpart: protected override void OnLoad(EventArgs e) ...