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.
6
votes
2answers
4k 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 ...
1
vote
2answers
317 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% ...
6
votes
2answers
2k 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
1k 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 ...
2
votes
1answer
7k 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
149 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
443 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
231 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 ...

