Enable Custom Scripts on SharePoint Online (O365)

Custom Scripts are disabled on SharePoint online by default. if we need to add some custom scripts or need to access your SharePoint Online Site using SharePoint Designer you need to allow custom scripts.

When you are going SharePoint Admin center in Office 365 portal, you can find setting tab ,after click on that you can find custom script title. by default these features are disabled.

capture

if you need to add custom scripts or SharePoint Designer Access to the SharePoint Online Site, you should allow these two.

you can allow custom scripts by two ways.

  1. Allow by using SharePoint Admin Center (Change using by above screen), but it takes up to 24 hours to allow custom scripts on SharePoint Online Site.
  2. Allow by using SharePoint Online Management Shell, its very simple you need to run some power shell scripts.

To Allow custom scripts by using SharePoint Online Management Shell, you have to follow below steps,

  1. Download & Install SharePoint Online Management ShellClick Here to Download SharePoint Online Management Shell.
  2. Open SharePoint Online Management Shell.Connect SharePoint site by providing SharePoint Site Credentials, run below power shell script on  SharePoint Online Management Shell.

    Connect-SPOService -Url “Site Url” -credential “User Name”

    Use SharePoint Admin Center Url for Connect SharePoint Online (eg. https://udara-admin.sharepoint.com).

  3. Allow custom scripts by using below power shell script, run this,use
    Set-SPOsite “Site Url” -DenyAddAndCustomizePages 0

After successfully run above Scripts now you can add custom scripts on SharePoint Online Site.

Hope you Learned Something,
Thanks,
Udara Eshan.

Clear SharePoint Designer Cache

Sometimes SharePoint Designer 2013 gets confused and Not Respond. One way to get it back on track is to reset it’s cache. Here is how,

Steps:

  1. Close SharePoint Designer.
  2. Delete all at    :  %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache
  3. Delete all at     : %APPDATA%\Microsoft\Web Server Extensions\Cache
  4. Go to SharePoint Designer options –> General –> Application Options –> Uncheck the “Cache site data across SharePoint Designer sessions”

 

 

 

ASP.NET Form Control Validation using Java Script and JQuery : Validate DropDown List in side the ASP.net Grid View

Here i would like to explain how to validate Drop Down List in side the Grid View,It’s very Simple.

var GridView = document.getElementById(‘<%=Grid.ClientID %>’);

var DropDownArray = new Array();

for (var i = 0; i < DropDownArray .length; i++) { //Looping Dropdown list Array to validate
if (DropDownArray .item(i).value == ‘Pending’) //If dropdown has no selected value
{
//Put Validation Message
return false;
}
}

Thanks…

What is .Net Frame work ? (A simple description)

The .NET Framework is a  platform created by Microsoft for Software developing.It has lot of versions,new released version is 4.6 (April-2016).

Microsoft Definition: A programming infrastructure created by Microsoft for building, deploying, and running applications and services that use .NET technologies, such as desktop applications and Web services.

.net Architecture

ic15013

  • It is Platform for software Developers.
  • It supports many programming languages ( Ex. Vb.net , C#.net ,Asp.net).
  • It supports cross platform developments (Ex.IOS,Android).
  • It has Integrated Development Environment (IDE) (Ex.Microsoft Visual Studio).
  • .NET Framework also includes the .NET Common Language Run-time (CLR), which is responsible for maintaining the execution of all applications developed using the .NET library.

Common Language Run-time (CLR) is the most important part of the .net framework,simply it converts your source code (c#,VB.net) to  native language (Machine Language).so then source code supports with operating system.

Components of the CLR.

Component-of CLR

1. Class Loader : Is an abstract class. Its purpose is to tell  CLR in what manner a class is to be loaded at runtime.

2. MSIL : Microsoft Intermediate Language is considered to be the lowest form of human readable language. It is CPU independent and includes instructions of how to load, store, initialize objects. JIT converts this MSIL into native code which is dependent on the CPU.

3. Code Manager : Is responsible for managing code at run-time.

4. Garbage Collector : The .NET garbage collector enables high-speed allocation and release of memory for the objects in managed code. Its main aim is proper memory management and optimizing the memory.

5. Security Engine : It ensures all the security restrictions.

6. Type Checker : It enforces the constraints of types. It enforces strictness in type checking.

7. Thread Support : It allows multi-threading.

8. Debug engine : It allows proper debugging of an application.

9. Base class library : It provides all the types that an application need at runtime.

10. Exception manager : Handles all the exception for an application during runtime.

11. COM Marshaller : It provides an option for interoperability for an application.

Steps of Source code compiling 

Step 1- Application code is written using a .NET – compatible language C#.

fig1

Step 2 – Code is compiled into MSIL, which is stored in an assembly (see Figure 1 – 2).

 

fig2

Step 3 – When this code is executed (either in its own right if it is an executable or when it is used from other code), it must first be compiled into native code using a JIT compiler.
fig3

Step 4 – The native code is executed in the context of the managed CLR, along with any other running applications or processes.
fig4

 

Hope you Learned some thing , this is very simple description,refer MSDN to more in detail about .net framework,

Thanks

Send SMS using usb dongle or modem in ASP.net, C#.net and SharePoint

Hi,

Here I would like to explain how to send SMS using USB dongle and modem, In here i have built some custom component to send sms very easily.Just you need call a method.

Steps

01. Download component.

  Download SMS Component

02. Add “UdaraDev.SMSUtility.dll” to Solution reference. 

03. Its very simple, Just insert below code

  • Method definition :

SMSComponent.SendSMS(“Dongle Attached Physical port name”,”Phone Number you want to send SMS”,”Text Message”).

Example. 

SMSComponent.SendSMS(“COM16”, “0711022122”, “HI”);

 

Thanks,

Send SMS in ASP.net and SharePoint using USB Dongle or Modem

Hi , Here i would like to explain how to send SMS using Dongle in ASP.net and SharePoint,

Below code set works for both ASP.net and SharePoint.

 

SerialPort serialport = new SerialPort(); // Create Serial port object to set physical Port in machine which dongle installed.

//Set Serial Port Properties
int mSpeed = 1;
 serialport.PortName ="COM16"; //Set Usb modem attached Port - as a example i'm using COM16 port
 serialport.BaudRate = 96000;
 serialport.Parity = Parity.None;
 serialport.DataBits = 8;
 serialport.StopBits = StopBits.One;
 serialport.Handshake = Handshake.XOnXOff;
 serialport.DtrEnable = true;
 serialport.RtsEnable = true;
 serialport.NewLine = Environment.NewLine;
//Sending SMS

serialport.WriteLine("AT+CMGF=1" + Environment.NewLine);
 System.Threading.Thread.Sleep(200);
 serialport.WriteLine("AT+CSCS=GSM" + Environment.NewLine);
 System.Threading.Thread.Sleep(200);
 serialport.WriteLine("AT+CMGS=" + (char)34 + "+94711022122"(char)34+Environment.NewLine);    //Set Recievers Phone Number
 System.Threading.Thread.Sleep(200);
 serialport.WriteLine(TextMessage + (char)26);
 System.Threading.Thread.Sleep(mSpeed);
 serialport.Close();

 

Thanks, Hope you learned something…….