Skip to main content

Posts

Featured post

XM Cloud content sync from prod to uat or UAT to prod step by step

When working with Sitecore, it’s common to need content synchronization across environments. Today, I’ll walk you through the steps to sync content from Production to UAT/TEST and vice versa. Steps to Follow 1. Set Up Your Workspace Create a folder on your computer where you will manage the script files and exported data. Open the folder path in PowerShell to begin scripting. We need to run some scripts in PowerShell to update the folder with the basic requirements for syncing content. PS C:\Soft\ContentSync> dotnet new tool-manifest PS C:\Soft\ContentSync> dotnet nuget add source -n Sitecore https://nuget.sitecore.com/resources/v3/index.json PS C:\Soft\ContentSync> dotnet tool install Sitecore.CLI PS C:\Soft\ContentSync> dotnet sitecore cloud login If the above error occurs, you will need to run a different command to resolve the issue. PS C:\Soft\ContentSync> dotnet sitecore init now, Again run above command to open and authenticate with XM Cloud. It will be there a...

Events in AngularJS

AngularJS Events which is use to fire according our requirements. Events of AngularJS is listed below. 1)    ng-click 2)    ng-mousedown 3)    ng-keyup 4)    ng-mousemove 5)    ng-mouseenter 6)    ng-keydown 7)    ng-dbl-click 8)    ng-mouseup 9)    ng-mouseleave 10)                ng-mouseover 11)                ng-keypress 12)                ng-change Some AngularJS Events Example is as follows. <div ng-controller="MyCon" >     <div ng-click="Data.doClick()">Click </div> </div> <script>     angular.module("myapp", [])           ...

How to separate data from comma format in stored procedure

Here, You may learn to separate data which is in the form of  comma . If you have data in comma format and want to insert all data separately the follow the below technique. Suppose you have data Example @pid="12,13,15,16,14" @amount="123,435,543,344,343" if want's to get separate and insert one by one in database then use the below code here, I have separated @pid and @amount. CREATE proc [dbo].[usp_setvendorkkshre] ( @vid int=0, @pid varchar(max)='', @amount varchar(max)='', @intResult int out ) as begin transaction declare @slicepid varchar(100),@sliceamount varchar(500),@index int=1,@index1 int=1 set @intResult=1 while @index<>0 and @index1<>0 begin SELECT @index = CHARINDEX(',',@pid) SELECT @index1 = CHARINDEX(',',@amount) IF @index<>0 and @index1<>0 ...

How to use connection string in asp.net

Here, You may learn to create connection string in asp.net . Write this code into your code behind file. SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"].ToString()); Write thi code into your web config file. <appSettings>     <add key="ConnectionString" value="data source=shashi-pc; initial catalog=db_institute_newchanges;uid=sa;pwd=12345;" /> </appSettings>   

How to return data in array by using web method in c#

Here, I have created web method and used with ajax to get value .Here you can learn how to retun data in array and also created list of details class.     [WebMethod]     public static Details[] BindClass()     {         List<Details> Details = new List<Details>();         DataTable dt = new DataTable();         string Query = "select deptid, deptName from dept_master where Status=1";         using (SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"].ToString()))         {             using (SqlCommand cmd = new SqlCommand(Query, con))             {                 con.Open();                 SqlDataAdapter da = new SqlDataAdapter(cmd);     ...

How to create properties and use it with Generic class

Here, I have created properties in GetDetails class and use to get large amount of data which comes from database . see below code i have added lots of data in dataset make loop to add all data in list by help of properties . This is best to have good programmer. Follow this type of technique to get data. List<Details > Details = new List<Details >();          if (Ds.Tables[0].Rows.Count > 0)         {             foreach (DataRow dtrow in Ds.Tables[0].Rows)             {                 Details user = new GetDetails();                 user.RowNumber = dtrow["RowNumber"].ToString();                 user.Date = dtrow["Date"].ToString();                 user.FromTime = dtrow["FromTim...

insert,delete,update with angularjs and asp.net mvc

CRUD operation with Angularjs and asp.net mvc. Some of the below point which will discuss  . ·          Create Database & Table ·          Create MVC Project using Visual studio ·          Add Web Api Controller ·          Use AngularJS to Consume WebAPI ·          Perform the CRUD Operation CREATE   TABLE  [dbo].[Student](       [StudentID] [ int ] IDENTITY(1,1)  NOT   NULL ,       [ Name ] [ varchar ](50)  NULL ,       [Email] [ varchar ](500)  NULL ,       [Class] [ varchar ](50)  NULL ,       [EnrollYear] [ varchar ](50)  NULL ,...