web-parts

Run exe from Sharepoint web part

喜夏-厌秋 提交于 2019-12-02 04:18:06
I have a button in a sharepoint web part that when clicked is supposed to launch the calculator: protected void Button1_Click(object sender, EventArgs e) { Process process = new Process(); process.StartInfo = new ProcessStartInfo("Calc.exe"); process.Start(); } However, when the button is clicked, nothing happens. Can someone tell me how to launch applications from a sharepoint web part? Quite frankly this is not possible. The code you have written is executed on the SharePoint server in the security context of the web app user. So if anything happens at all, a calculator is opened for the web

Sharepoint webpart combobox of lists

孤街醉人 提交于 2019-12-02 04:14:01
I have a webpart that works off of a list but what I'm trying to do create a dropdown that contains a list of sharepoint lists so that when the user edits the page and selects 'modify shared webpart' they are able to choose a list item and that gets parsed back to the webpart. Any examples or links to examples appreciated! Thanks Dan What you are looking for is called a Toolpart. Take a look at this example for a tutorial on how to create one. Overall, your general steps will be: Create your custom Toolpart class inheriting from Microsoft.SharePoint.WebPartPages.ToolPart In your custom

Create a webpart page with an webpart with in it programmatically

拈花ヽ惹草 提交于 2019-12-02 02:06:47
I want to create several webpart pages (programmatically) with custom web parts in it. I have searched the internetz but couldn't find anything that I could get to work. Here is my code so far (where I create a welcome page, not a webpart page): using (SPSite site = new SPSite("http://v99-sp-public/")) { using (SPWeb web = site.OpenWeb()) { PublishingSite pSite = new PublishingSite(site); SPContentType ctype = pSite.ContentTypes["Welcome Page"]; PageLayoutCollection pageLayouts = pSite.GetPageLayouts(ctype, true); PageLayout pageLayout = pageLayouts["/_catalogs/masterpage/welcomesplash.aspx"];

Create a webpart page with an webpart with in it programmatically

这一生的挚爱 提交于 2019-12-02 01:41:02
问题 I want to create several webpart pages (programmatically) with custom web parts in it. I have searched the internetz but couldn't find anything that I could get to work. Here is my code so far (where I create a welcome page, not a webpart page): using (SPSite site = new SPSite("http://v99-sp-public/")) { using (SPWeb web = site.OpenWeb()) { PublishingSite pSite = new PublishingSite(site); SPContentType ctype = pSite.ContentTypes["Welcome Page"]; PageLayoutCollection pageLayouts = pSite

How to embed SharePoint 2013 webparts directly in aspx layout page as default webparts for that layout

五迷三道 提交于 2019-12-01 22:25:15
问题 I am using SharePoint 2013, and have a custom master page and several aspx layout pages all of which to be deployed get copied into the "Master pages and page layouts" section within Site Settings. These aspx pages contain web part zones, but how can I add a web part in the markup of the aspx page, within the web part zone? What I'm essentially trying to do is embedd "Default" webparts into the layout of the page, so that when this layout is chosen for particular page, it already has webparts

Page viewer webpart won't take login parameters

≯℡__Kan透↙ 提交于 2019-12-01 09:50:47
I need to show an external site through our sharepoint portal and have added a Page viewer web part. The problem is that the address includes a login and password used to autologin to the external site but Sharepoint only shows the login page on click. If I click the "Test link" in the web part properties it opens as it should but in a different window and not in the sharepoint frame. The adress has the format http://www.site.com/companyname/Login.aspx?style=companyname&lang=en&l=login&p=password How can I get the autologin to work in the frame used on my webparts page? Any help very

How to use jquery correctly in SharePoint Web Part - jquery doesn't always fire

自作多情 提交于 2019-12-01 06:07:21
I'm learning how to use jquery with SharePoint. My example draws a red box inside the Content Editor Web Part when a link is selected. My code works when the SharePoint page is in edit mode but not after I've left the page and returned in non edit mode. The jquery function does not fire for some reason... I'm missing something simple but not sure what. Thanks for any help. Kevin My master page for the site connects to the jquery-1.3.2.min.js file this way: <SharePoint:ScriptLink language="javascript" name="jquery-1.3.2.min.js" Defer="true" runat="server"/> My Content Editor Web Part code looks

How to use jquery correctly in SharePoint Web Part - jquery doesn't always fire

妖精的绣舞 提交于 2019-12-01 04:03:23
问题 I'm learning how to use jquery with SharePoint. My example draws a red box inside the Content Editor Web Part when a link is selected. My code works when the SharePoint page is in edit mode but not after I've left the page and returned in non edit mode. The jquery function does not fire for some reason... I'm missing something simple but not sure what. Thanks for any help. Kevin My master page for the site connects to the jquery-1.3.2.min.js file this way: <SharePoint:ScriptLink language=

Retrieve SharePoint List Data and bind this to a dropdownlist

我的梦境 提交于 2019-11-30 21:59:29
I'm fairly new to SharePoint so apologies in advance for sounding like a 'Newbie'. I have created a simple Webpart, which uses a Web User Control - [ .ascx file] to provide all the controls for the Webpart. On the .ascx file, there is a DropDownList which is hard-coded at the moment and works well in the Webpart (within a SharePoint site). However, I want the DropDownList on the .ascx file to be bound to a particular Column of a SharePoint List, so that when I update that column of the SharePoint List, the DropDownList reflects the update automatically. Do any of you kind folk have any ideas

Retrieve SharePoint List Data and bind this to a dropdownlist

不想你离开。 提交于 2019-11-30 17:33:59
问题 I'm fairly new to SharePoint so apologies in advance for sounding like a 'Newbie'. I have created a simple Webpart, which uses a Web User Control - [ .ascx file] to provide all the controls for the Webpart. On the .ascx file, there is a DropDownList which is hard-coded at the moment and works well in the Webpart (within a SharePoint site). However, I want the DropDownList on the .ascx file to be bound to a particular Column of a SharePoint List, so that when I update that column of the