Posts

Kamlesh Belote - GitHub Repositories

KB Kamlesh Belote — Projects Live demos and repositories. Click "View live" to open the GitHub Pages demo or "View repo" for source. HelmChart-public Helm chart demos and charts Loading… View live View repo cloudfront-logs-public CloudFront logging demos & configs Loading… View live View repo Data loaded from GitHub public API. If counts do not appear, rate limits may apply. Deploy this file to your GitHub Pages or S3 bucket to publish.

Start With MVC Application Part 1

Image
Before we starting to create MVC Application we required customer table on which we create our application. So first create customer table as show in below CREATE TABLE [dbo].[tblCustomer] ( [Id] [int] IDENTITY(1,1) NOT NULL, [Name] [varchar](50) NOT NULL, [Address] [varchar](500) NOT NULL, [City] [varchar](50) NOT NULL, [State] [varchar](50) NOT NULL, [Country] [varchar](50) NULL, [Phone] [varchar](15) NULL, [EmailId] [varchar](50) NULL, CONSTRAINT [PK_tblCustomer] PRIMARY KEY CLUSTERED  ( [Id] ASC )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY] ) ON [PRIMARY] GO We creating our MVC Application with Visual Studio 2010. Start your visual studio, from File menu select New Project as shown in below. Select ASP.NET MVC 2 Web Application template (other wise download template from http://www.asp.net/mvc)  give name MyFirstApplication and clic...

How to implement SPCache in SharePoint 2010 ?

Following code shows implementation of SPCache object in SharePoint 2010. // Object for Cacheing public class TestClass     {         public string someData { get; set; }         public TestClass(string myData)         {             this.someData = myData;         }     } // SPCache Object Settings Cache Parameters  public class MyCache     {         public static SPCacheConfig cacheConfig = new SPCacheConfig();         internal static CacheParameter[] CacheParameters = new CacheParameter[]         {           // DataCache           new CacheParameter(ServiceName,                                           ...

Access Business Connectivity Services object using Client Application

Business Connectivity Service (BCS), enables users to read and write data from external systems - from web services, database, and Microsoft .NET Framework. Following code snippet shows, how to access BCS object using Client Object Model We already have BCS list named "Customer", contains columns Name, Address // Specify your SharePoint Web Url  ClientContext clientContext = new ClientContext("http://contoso:3434");               // Specify SharePoint list name                 List list = clientContext.Web.Lists.GetByTitle("Customer");                 CamlQuery query = new CamlQuery();                               query.ViewXml =                     @"  <View>                 ...

An exception occurred when trying to issue security token

Security Token Service Application Error: Problems:  Unable to Login with Claim base authentication to SharePoint 2010 Site Errors An exception occurred when trying to issue security token: The requested service, 'http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc' could not be activated. See the server's diagnostic trace logs for more information. Or WebHost failed to process a request.  Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/15688314  Exception: System.ServiceModel.ServiceActivationException: The service '/SecurityTokenServiceApplication/securitytoken.svc' cannot be activated due to an exception during compilation.  The exception message is: Method not found: 'System.String System.ServiceModel.Activation.Iis7Helper.ExtendedProtectionDotlessSpnNotEnabledThrowHelper(System.Object)'.. ---> System.MissingMethodException: Method not found: 'System.String System.ServiceModel....

Hide Sign in as Different User in SharePoint 2010

Hide sign in as Different User action on welcome menu using customization of welcome control Open WelCome.ascx file in visual studio. you found this file in controltemplates folder. We want to show only sign out option for welcome menu. Remove menu templates as per your required and save as "Custom_Welcome.ascx" <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Control Language="C#...

How to open hyperlinks into modal dialog box in SharePoint 2010

SharePoint 2010 provides new feature "Modal dialog box". In this blog we shows how to open hyperlinks in modal dialog box using simple jquery selector. Declaration syntax for modal dialog box is as follows //Using the DialogOptions class. var options = SP.UI.$create_DialogOptions(); options.title = "Dialog box title"; options.width = 300; options.height = 500; options.url = "PageUrl"; SP.UI.ModalDialog.showModalDialog(options); //Using a generic object. var options = {     title: "Dialog box title",     width: 300,     height: 500,     url: "PageUrl" }; SP.UI.ModalDialog.showModalDialog(options); Now we put above modal dialog syntax in jquery selector $("[href(selection attributes)' Condition ']").click ( function () {                                                           ...