Questions tagged [visual-web-part]
Visual Web Part is a Web Part built using a User Control (.ascx)
453
questions
1
vote
1
answer
141
views
After adding mapped Layout folder in Visual WebPart project showing null reference error in Sharepoint 2010
I wanted to use css file to my visual WebPart. Developing it in VS2012. Initially worked fine without .css after deployment. After following steps here, updated the .wsp. It is also working fine. But ...
0
votes
1
answer
35
views
What settings need to do in following senario to validate Sharepoint Site url in VS 2012?
Question may be basic, but scenario is not understood.
scenario is I am having the SharePoint 2010 installed on Windows Server 8 under Domain1. My Developer machine also under Domain 1. But while ...
1
vote
1
answer
236
views
Alternative approaches to designing workflows for simple approval process in SharePoint
I have to develop a simple document approval workflow in my SP 2013 on-premises site collection.
Instead of going with designer workflow, visual studio sequential workflow,can i implement this ...
1
vote
0
answers
42
views
Set Timeline XML with other Timeline XML
I have two timeline webparts: Source and Destination.
I have to 'export' or duplicate the Source Timeline View in the destination Time Line.
XmlDocument timelineXML = new XmlDocument();
...
1
vote
0
answers
30
views
Visual Studio Community for SharePoint 2013 [duplicate]
I am site administrator for one of the sharepoint 2013 on-premise site and I would like to develop the custom webparts for communicating lists and libraries at site level using visual studio Community ...
0
votes
1
answer
706
views
Creating Visual Web part for file upload
I am trying to create a visual web part to upload documetns using FileUpload control. Below is the working code for uploading a file.
protected void UploadButton_Click(object sender, EventArgs e)
...
3
votes
1
answer
729
views
multi checkbox webpart properties
I wish to provide option to Select multiple option in my webpart Properties. Below code only allows me to Select one option. How to Select multiple options?
Private colorPicked As MyColors
Public ...
2
votes
1
answer
2k
views
How To Move SharePoint App From Development Site To Production Site
I have created a SharePoint app in SharePoint online in visual studio. This consists of a client web part and a web app hosted in Azure. I have set up a development site and successfully managed to ...
0
votes
1
answer
647
views
Deploy Web Part from Visual Studio to remote SharePoint [duplicate]
I've made a Visual Web Part in Visual Studio (non-sandboxed) that I could easily deploy & "debug" on my local SharePoint installation.
I want to copy this web part to another SharePoint ...
1
vote
1
answer
2k
views
Populate Custom Web Part Property from List
I have a custom web part (Contact Info) with a property (Topic). The topic is a drop down list (ie behind the scenes its an enum type. What I would like is for the values of this dropdown property to ...
4
votes
1
answer
194
views
Which is recommended form control to use in SharePoint?
When trying to develop Web Part or Application page or modifying existing SharePoint application pages like (user.aspx, create.aspx, etc..)
From below list which control is recommended to use
<...
1
vote
1
answer
70
views
ObjectDataSource - schema seems cached - unable to refresh
Within a Visual Studio 2012 Visual Web Part, I've created a simple FormView referencing an ObjectDataSource to autogenerate an editable form. Creating this the first time, there was no issue. ...
1
vote
1
answer
202
views
Visual Webpart Registration form where data is stored to SQL Database table on button click
Please give the snippet for Visual Webpart where data is stored to SQL Database table.I'm able to store it in list but i need to store directly in SQL Server database table on submit.
0
votes
1
answer
62
views
Is there any reference such as MailKit to add in sharepoint 2010
I am developing a visual webpart in SharePoint 2010 project and I have to deal with emails in my visual part.
I tried to add MailKit reference to my project and it keeps telling me that it work only ...
0
votes
1
answer
938
views
If Page is idle for sometime any postback leads to whole page refresh in UpdatePanel
Within the solution there are two webparts, second is being shown within a modal dialog in first webpart.
In second webpart everything is inside update panel(bad practice).
When I open the second ...
0
votes
1
answer
31
views
Error when I search for some specific words in SharePoint 2010
I have a custom webpart on the search page which is getting data from an external web service.
I am getting the following error when I am searching for some specific words (e.g test) in sharePoint ...
2
votes
2
answers
312
views
Cannot write file in a folder
I cannot write a file into a folder through some code in a VisualWebPart in a Sharepoint 2013 solution.
I've given write permission to c:\myfolder to Everyone.
The code I use to write is the ...
3
votes
2
answers
2k
views
Getting custom webpart property with JSOM
I have a webpart with a custom property setup like so:
public static string TargetUrl;
[WebBrowsable(true),
WebDisplayName("My DisplayName"),
WebDescription("My Description."),
Personalizable(...
2
votes
1
answer
40
views
Top visited entries on site collection blogs
I want to develop a web part which shows the ranking of entries of a site collection.
By now, I think a way to do this is to use a Javascript code added on the master page which adds a row to the ...
1
vote
1
answer
103
views
JSOM peoplepicker 500 error
I am implementing a people picker on my visual webpart to allow users to query a list according to a person. My implementation is similar to the post found here, but when typing in the people picker I ...
5
votes
2
answers
2k
views
Dynamically get List ID from List Name
In my Visual webpart I need to, based on the name of a list get the ID of the list, dynamically. I'm using C#.
How can this be done?
1
vote
0
answers
33
views
How to create Visual Connectable Web Parts
I want to create a Visual connectable web part.
Provider web part contains list view part and consumer web part is a normal User Interface screen which will get Record ID(Row ID) of selected row and ...
1
vote
0
answers
265
views
How to pass ID of selected row in custom list view web part in label of share point 2013
I have created a XsltListViewWebPart using server side object. Now I have to pass the ID of the selected item into a label. I want to pass the ID without JavaScript.
This is my code for provider
...
1
vote
1
answer
92
views
Dynamic translation in SharePoint
I am using a visual webpart to show custom content that I get from a custom web service. I want to translate that custom content dynamically in SharePoint.
Resource file is not an option since that ...
1
vote
1
answer
2k
views
Set DropDownList text and value c#
I am currently trying too develop a visual webpart for an on premise SharePoint environment. The webpart contains a dropdown which I need to set the text and value so that I can use this later as part ...
0
votes
1
answer
163
views
SharePoint 2013 Empty Project - Page Load
I created a new SharePoint 2013 Empty Project in Visual Studio, I added visual web part. I want to write code at Page Load. But Page Load doesn't appear under my project. How to I find it?
3
votes
1
answer
2k
views
Closing the Window from Visual Web Part Page in Chrome is not working
<script lang="Javascript">
function quitBox(cmd) {
if (cmd == 'quit') {
open(location, '_self').close();
}
return false;
}
</script>
<input ...
0
votes
1
answer
702
views
Error when adding custom web part to a page
I have a web part I have developed in Visual Studio. It just goes out to a document library and gets all the items:
SPListItemCollection collListItems = oDocumentLibrary.GetItems();
This works fine. ...
0
votes
0
answers
150
views
Why does marking an html element of type date "run at server" fail in Sharepoint 2010?
I thought HTML5 was backwards compatible - so why does Sharepoint 2010 knock me sprawling to the ground when I try to use the new input type "date"?
That's apparently the problem here; my Web Part ...
0
votes
1
answer
1k
views
Visual web part, SharePoint 2013 with VS 2012. Gridview with paging , export to excel
Created a visual web part for SharePoint 2013 with VS 2012 template. Web part has gridview with paging enable. On the same I have a button for export to excel. Gridview works perfect , but when I ...
1
vote
1
answer
242
views
Visual webpart cannot be added to anonymous website
We have an anonymous website (configured as shown in this blog on How to enable anonymous access in SharePoint 2013). If you make a new standard visual webpart (farm solution) and want to add it to ...
1
vote
1
answer
195
views
SPSiteDataQuery for Task List not working
I am creating a visual web part for aggregating all task in all webs of a site collection
I am using SPSiteDataQuery to get all tasks but it does not work for Task list
i.e.
Task List
query....
0
votes
0
answers
365
views
Javascript Conflict on Visual Webpart when adding multiple times with different webpart properties on single page
What I am doing:
I am retrieving list items from list using javascript as per visual webpart custom property. I have created a dropdown in webpart editor part from where I am getting site url. As per ...
0
votes
1
answer
2k
views
SharePoint 2010 Adding Web Part Error: Object reference not set to an instance of an object
I created a Farm Solution visual web part in a development environment (VM). I've run into issue while attempting to deploy this Visual Web Part in a test environment. I added (Add-SPSolution), ...
0
votes
1
answer
993
views
Display/hide control in Webpart based on edit/browse mode
I have a Visual Studio project in which I have created a Visual Webpart. In the user control I have a panel which I want to display in edit mode and hide in browse mode.
ASP.NET code snippet:
<...
0
votes
1
answer
232
views
Search list using linq
Following is my code to load results in a gridview. What I want?
I want to be able to modify linq query based on start date,end date and title. User can search on any 1 field. How to make linq query ...
2
votes
1
answer
1k
views
update panel not working in visual webpart
I am trying to use update panel in visual webpart(farm solution only) but when i click on button nothing happens
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
&...
1
vote
1
answer
52
views
Where to store often used class in Sharepoint 2010?
I have a helper class which is often used in number of webparts. The file contains useful methods. Everytime when I create a new webpart in Visual Studio, I need to import this file into the project. ...
1
vote
2
answers
5k
views
get sharepoint DateTimeControl selected date?
currently i m creating Visual web part , with SharePoint DateTimeControl
trying to get select date from DateTimeControl programmatically ..
how to get DateTimeControl selected date value.
0
votes
0
answers
51
views
How can I add custom visual web part to a site pages
I want to add custom visual web part to an existing site page. How can I achieve that? Do i need to create feature for that ?
0
votes
1
answer
576
views
getting error while adding visual webpart
I have created visual webpart which as .net validation control. When i deploy part and try to insert into page i get error
This page contains content or formatting that is not valid. You can find ...
0
votes
1
answer
1k
views
SharePoint 2013 C# get all websites and sort alphabetically
I am currently building a visual webpart for an on premise SharePoint farm in C#.
I am currently able to get all of the webs and also get all of the list items within each web, using the CAML Query I ...
0
votes
2
answers
193
views
Bind in GridView in a VisualWebPart not evaluated
I have a VisualWebPart with a AspTemplateField that should bind a field but it doesn't
The code is the following:
<SharePoint:SPGridView
ID="GridView1" runat="server"
AutoGenerateColumns="...
0
votes
1
answer
152
views
Cannot deploy visual webpart from sandboxed Sharepoint 2013 solution
I'm trying to deploy a visual webpart to SharePoint 2013 site from sanboxed solution. My webpart RSSNews.ascx (it doesn't have custom code behind):
<%@ Assembly Name="$SharePoint.Project....
1
vote
2
answers
512
views
Find a div in a SharePoint page from code behind [Visual Webpart]
I have created a custom page layout with a div tag in it. I am trying find this div from a visual webpart code behind,but the control is always null.
Page Layout
<div id="abc" runat="server">....
1
vote
1
answer
92
views
Submitting data from PeopleEditor control in Web Part gives error
I have a web part that submits data to a list and it uses a PeopleEditor control for selecting users.
Once user is selected, when I submit the form it gives following error
Invalid data has been ...
1
vote
3
answers
2k
views
SharePoint DateTimeControl does not render the calendar in web part
I have created a web part for creating new list item using VS.
Web part has a DateTime Control.
If I click on Calendar icon then it does not render it, rather gives a server error.
I have included ...
0
votes
1
answer
73
views
Migration Visual Web Part from Sharepoint 2010 to Sharepoint 2013 - Web.Config error
I am migrating a webpart with 2 External List and 9 normal list from Sharepoint 2010 to Sharepoint 2013.
After migrating i Geting this error. May be I hard coded something in Web.config file. Please ...
2
votes
1
answer
2k
views
Getting this error: $Resources:core,ImportErrorMessage;
I have created a Visual Web Part in SP2013. But when I am adding the webpart to the page it is giving me the following error "$Resources:core,ImportErrorMessage;". And the error only comes when I am ...
1
vote
1
answer
456
views
Migration Visual web part from Sharepoint 2010 to Sharepoint 2013
How do I migrate Sharepoint Visual Web Part from Sharepoint 2010 to Sharepoint 2013.
I know I should migrate all list, and whats more. How upgrade the C# code to work with Sharepoint 2013. Please ...