7
votes
Why am i unable to debug an Provider Hosted SharePoint app?
Right click on your solution -> Select Set Startup Projects -> Choose Multiple Startup Projects -> and select Start action for both app and app web projects. Also, app web project should be the first ...
6
votes
Accepted
Using the variable of .aspx code in .js code
That code is not ASPX code. It is JavaScript code (inside a Script block in your ASPX file?)
If it is not a Global variable yet, you can declare it as window.js=res[1] to force it in the global scope ...
4
votes
Accepted
Lookup column value not updated - ListsWebServices and Asp.NET
If Constants.CLIENT_FIELD_PARENT_ID is the name of a multivalue lookup column then the value for that should be in the format Id1;#Value1;#Id2;#Value2 or without values Id1;#;#Id2;#
Which will give ...
4
votes
What are the Type.registerNamespace advantages over standard JavaScript methods?
There aren't any technical advantages to using this method. It simply allowed developers to use the same conventions they used on the client (JavaScript) as they used on the server (ASP.NET SharePoint ...
4
votes
Accepted
InitializeControls() not found in Context
Few points you need to make corrections
InitializeControl() instead of InitializeControls()
You will find a ".ascx.g.cs" file once you expand '.ascx" file.
Change the namespace to same as in ".ascx....
4
votes
Accepted
How to use ASP.NET button click event in SharePoint Web Part
I am pre-assuming that you are adding this in your user control or visual web part.
You can add button click event in various methods:
C#
Your HTML part:
<asp:Button id="Button1" Text="Click ...
3
votes
get Dropdown selected value SharePoint 2013
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....
3
votes
Accepted
My dropdown won't work after I exported the gridview to excel file?
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 ...
3
votes
Accepted
get Dropdown selected value SharePoint 2013
To get a SharePoint Choice Field value
SPFieldChoice myChoicesfield = (SPFieldChoice)list.Fields["FieldName"];
for (int i = 0; i < myChoicesfield.Choices.Count; i++)
{
...
3
votes
Accepted
HTML in a column value, how to remove it?
try disabling HtmlEncode.
<asp:BoundField DataField="Your Column Name" HtmlEncode="false" />
BoundField.HtmlEncode Property in MSDN
https://stackoverflow.com/a/27720086/1294606
3
votes
Accepted
How can I get data from a sharepoint 2010 server from a separate asp.net web application?
Is there a way I could get the data from the SharePoint web application from my asp.net app without installing SharePoint foundation on the asp.net server?
Yes, you can read data from SharePoint in ...
3
votes
Accepted
How to properly use GridView to create items on SharePoint Lists?
Try below code
private void AddGridRecords(int ID)
{
try
{
SPWeb web = SPContext.Current.Web;
SPList List = web.Lists["FORM D List"];
web....
3
votes
Accepted
SharePoint Online Webhook with ngrok "Access Denied"
Most likely you should add more permissions for your Azure AD app, AllSites.Manage or even AllSites.FullControl. Read\Write is more about the list items and not webhooks.
2
votes
HTML in a column value, how to remove it?
Use can use HtmlDecode for it.
eg:
In RowDataBound event use
if (e.Row.RowType == DataControlRowType.DataRow)
{
string decodedText = HttpUtility.HtmlDecode(e.Row.Cells[0].Text);
e.Row.Cells[...
2
votes
Accepted
Index out of range for delete in gridview
This error exception is thrown mostly when you try accessing an item at an index that isn't present. The best way to resolve the issue is to debug and check the length of the array or the data table ...
2
votes
Accepted
SP07 - Open a pdf file in new tab on IE
Why you are using SPLinkButton?
You can simply use HyperLink with its attribute called Navigateurl from your code.
You can follow below steps in below mentioned URL.
Open PDF files from a ...
2
votes
get Dropdown selected value SharePoint 2013
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 ...
2
votes
My dropdown won't work after I exported the gridview to excel file?
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, ...
2
votes
Accepted
How to query with 3 Conditions? CAML QUERY
queryMuaj.Query = "<OrderBy>" +
"<FieldRef Name ='testb' Ascending = 'TRUE'/>" +
"</OrderBy>" +
"<Where>" +
...
2
votes
How to design my site page in sharepoint, only want to use .net
You have two options to do that
Create a blank custom master page and attach it to your page.
Or just remove DynamicMasterPageFile="~masterurl/default.master" %> from <%@Page tag%>
...
2
votes
How to perform search on SharePoint list bound to a gridview
Place a search box and button on button click query your datasource i believe its List in this case
public void Search(string searchText)
{
ClientContext clientContext = new ClientContext(...
2
votes
Accepted
sharepoint server 2013 error Session state disabled for asp.net
In SharePoint 2013, try to do the following:
Open the SharePoint web application web.config.
In the <system.web> section, find the <httpModules> element and edit it like the following:
&...
2
votes
Accepted
How to dynamically display most visited links in a SharePoint Site to site visitors?
If you are using SharePoint 2010, you can use a Web Analytics web part to display most visited pages in Site on the page.
How to display most visited sites in SharePoint 2010 using Web Analytics web ...
1
vote
How to query with 3 Conditions? CAML QUERY
Try this query:
<OrderBy> <FieldRef Name ='testb' Ascending = 'TRUE'/> </OrderBy>
<Where>
<And>
<Eq><FieldRef Name='Team' /><Value Type='Text'&...
1
vote
Accepted
SP - How to change ID in URL and Redirect with Button Event
Updated
Just try below code:
Just replace SPUtility line with below code:
string url = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path) + "?ID=" + wayBillID;
SPUtility....
1
vote
SP - How to change ID in URL and Redirect with Button Event
Please try below mentioned code by which you can change the querystring parameter value
UPDATED
var qs = HttpUtility.ParseQueryString(HttpContext.Current.Request.Url.PathAndQuery);
qs.Set("ID", "...
1
vote
SP - Get items form certain SPChoiceField
This is the solution (:
SPList wayList = web.Lists["WayBill"];
SPFieldChoice dropdown = wayList.Fields.GetFieldByInternalName("Company") as SPFieldChoice;
foreach (string choiceName in ...
1
vote
Accepted
Sharepoint Updating MMS DocumentSet field
updating a MM field is a little different to a single line of text field! You have to create an object of type TaxonomyFieldValue then set the GUID and label to the field and then you can set the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
asp.net × 488development × 130
sharepoint-enterprise × 79
web-part × 58
2013 × 51
sharepoint-online × 50
sharepoint-server × 47
2010 × 41
visual-studio × 35
sharepoint-designer × 32
javascript × 29
sharepoint-foundation × 27
visual-web-part × 23
aspx × 21
2007 × 20
mvc × 14
workflow × 13
web-services × 13
sharepoint-addin × 12
custom-form × 12
html × 12
csom × 11
.net × 11
application-pages × 10
jquery × 9