New answers tagged

1

Since it is your custom WCF service. Couple of options In case of on premise deploy the WCF service into SharePoint Context (ISAPI) In case of office 365 you can create SAML request for authentication. You should get the credentials from the user and pass it for authentication.


0

Add the following code below class definition. [WebBrowsable(true), WebDisplayName("Project ID"), WebDescription("Enter Project Number"), Personalizable(PersonalizationScope.Shared), Category("Project Settings")] public string ProjectID { get; set; } To get the property value in code, you should use the “ProjectID” variable that defined as public string ...


0

The answers to this are quite large so I will link to some appropriate info that will hopefully get you pointed in the right direction. Your best bet would be to implement this as a provider hosted add-in, this will allow you to do whatever you want with your solution but still allow it to leverage much of SharePoint functionality (including the UI, should ...


1

To get the properties of a visual WebPart programmatically, you can refer to the following code for the WebPart at this article. public enum CityEnum { Manila, Berlin, Auckland, Zurich }; public static CityEnum SampleDropDown; [Category("Extended Settings"), Personalizable(PersonalizationScope.Shared), WebBrowsable(true), WebDisplayName("Sample Drop Down"), ...


2

To get a SharePoint Choice Field value SPFieldChoice myChoicesfield = (SPFieldChoice)list.Fields["FieldName"]; for (int i = 0; i < myChoicesfield.Choices.Count; i++) { DropDownListName.Items.Add(myChoicesfield.Choices[i].ToString()); } To get a SharePoint Multiple Choice Field value SPFieldMultiChoiceValue ...


1

Make sure you write dropdown change event. Keep autopostback property to true. In dropdown change event of your dropdown write below code. protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e) { Label1.Text = DropDownList4.SelectedItem.Text; } This will show display value of selected choice You can ...


3

From where DropDown1 came? In your code you are adding items in DropDownList4 and you are trying to access the value from DropDown1. Your code should be like: string selectedvalyear = Convert.ToString(DropDownList4.SelectedItem); Label1.Text = selectedvalyear; If you want to change the value of Lable1 from dropdown every time when you change item, then ...


2

Because you have called the Response.End(), which ends the page execution, the body onload event would never be fired. The problem is sharepoint catches form submits and downloads so you cannot double click a button. I had same issue, adding below script on aspx page helped me to resolve it <script type='text/javascript'> _spOriginalFormAction = ...


2

It is SharePoint which displays your value as a DropDown/Select. The Field value in the SQL database is stored as a String (with only the selected value). When you export to Excel it exports values, not SharePoint functionality


2

queryMuaj.Query = "<OrderBy>" + "<FieldRef Name ='testb' Ascending = 'TRUE'/>" + "</OrderBy>" + "<Where>" + "<And>"+ "<And>" + "<Geq>" + "<...


1

Try this query: <OrderBy> <FieldRef Name ='testb' Ascending = 'TRUE'/> </OrderBy> <Where> <And> <Eq><FieldRef Name='Team' /><Value Type='Text'>" + selvalcomp+ "</Value></Eq> <And> <Geq><FieldRef Name='testb' /><Value Type='DateTime' IncludeTimeValue='FALSE'&...



Top 50 recent answers are included