Tag Info

New answers tagged

0

Can you try following connection string: Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI; User ID=myDomain\myUsername;Password=myPassword; Source: ConnectionStrings.com


0

If the List Item (objItem in this example) is populated: string s = new SPFieldLookupValue(objItem["MyField"].ToString()).LookupValue;


0

You need to create a new SPFieldLookUp http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldlookup.aspx and cast the context item to that object. Then you will have the SPFieldLookupValue object available to work with and you can get the value of that field in multiple contexts. Something like this should work ...


0

My situation was a bit different, but I landed here while searching for a solution. I had a SharePoint list item event receiver scoped for Web and controlled by a Web-scoped feature. Thus, it should only fire on the website's list if the feature has been enabled. However, it was firing on other sites as well where the feature was deactivated. Turned out ...


0

you need to use itemDeleted method within the event reciver! code to use: public override void ItemDeleted(SPItemEventProperties properties) { Response.Redirect("http://yourSiteHomepage.co.uk"); } i would say use code below but you cant as there is no httpContext in event reciver so code above should work fine! ...


1

You can use _currentContext.Response.Redirect as below: public class TestEventHandler : SPItemEventReceiver { private readonly HttpContext _currentContext; public TestEventHandler() { _currentContext = HttpContext.Current; } // Methods public override void ItemAdding(SPItemEventProperties properties) { var url = new ...



Top 50 recent answers are included