Skip to main content

Posts

Featured Post

How to create customizable products in Shopify for Free (No coding!)

Creating customizable products in your Shopify store not only increase your customer satisfaction, it also increases your conversion rate.  Here is a method to add custom options for your Shopify product and convert it into personalized product - Go to Shopify store page and search for "Advanced Product Customizer" app or you can directly the the Shopify app page by clicking on this link Advanced Product Customizer . Install  Advanced Product Customizer  app for free in your Shopify store  From the application dashboard, enable to app embed block to complete the installation process Click "Product Custom Options"  From the Shopify products list, select the product on which you want to add custom options. Advanced Product Customizer  offers Image Swatch, Color Swatch, Text box, File Upload, Radio, Checkbox, Date Picker and more. Here is the a demo video for adding custom option for a Shopify product -

Prepared Statements for Database driven application

Prepared Statement is commonly used by application to execute the same parameterized SQL statement again and again. Prepared statements are compiled only once. If we need to execute a statement multiple times then execution of prepared statement is faster as it is compiled only once, while in case if we are using direct statements then each statement is first compiled every time before execution. So, time taken in Prepared execution is lesser as compared to the time taken in direct execution. Prepared statement are also known as parameterized queries. Parameterized queries and prepared statements are features of database management systems that basically act as templates in which SQL can be executed. Example of Prepared Statement using Java and C# We are using Emp table. Here "id" is the primary key of the table. Following query will retrive all the data of a row for id =1 SELECT * FROM Emp WHERE id =1 Now, if we create a template of above statement and use that fo...

ASP.NET 4.0 Web forms URL Routing

Hi, while working on a ASP.NET project I saw that URLs of the application were quite large and were not much meaningful to the user. Also they were showing the actual folder structure in the project that I found a bit unsecured. So, here I get the requirement to configure application to accept URL of webpages which are meaningful and short. To fulfill this requirement I used URL routing feature of ASP.NET. URL routing lets you to configure your application to accept URL which do not point to physical files. Instead of this we can show some semantically meaningful URL to user. For example - Initial URL - http://www.yoursite.com/products.aspx?category=laptop Using routing you can configure your application render same page using following URL - http://www.yoursite.com/products/laptop You can also find that new URL is SEO - friendly and can help in search engine optimization (SEO). Implementing URL routing in ASP.NET web forms In the implementation part of routing we n...

How to add ActiveX control at run time using C#.NET

Hi, recently I worked on a project where the requirement was to add an ActiveX control dynamically to a UserControl type project. Here I was trying to add that activeX control to multiple tab pages of a tab control. Here is the code that I used - for(int i = 0; i < 4; i++) {       this.LineTabs.TabPages.Add(i);       AxTree treeadd = treeload(this.LineTabs.TabPages[i]); } In the above code I am creating four tab pages at runtime and adding ActiveX control "AxTree" to these pages dynamically using function "treeload". Here is the code for "treeload" function - private AxTree treeload(TabPage tab)     {         AxTree treeobject = new AxTree();         ((System.ComponentModel.ISupportInitialize)(treeobject)).BeginInit();         SuspendLayout();         tab.Controls.Add(treeobject);         treeobject.Dock = DockStyle.Fill...

Dynamically adding controls to web form and their event handling in ASP.NET using C#

Add control dynamically using code on web form Sometimes in web form we need to add controls using code. Following C# code can be used to add button control dynamically to web form.     Button btn1 = new Button();     btn1.Text = "New Button";     this.Controls.Add(btn1); To add the dynamically created button control to a Panel control use following code -     Panel1.Controls.Add(btn1); Event Handler for dynamically added control We can use following code to declare click event for dynamically added button code-   btn1.Click += new EventHandler(btnClick); After declaring the click event, define the event handler using C# - private void btnClick(object sender, EventArgs e) {       Button btn = (Button)sender;  //get the button which is                                     ...

Paging in MS SQL Server 2005/2008 using ROW_NUMBER()

Sometimes we need to implement paging functionality in our database. We can use ROW_NUMBER() function for this purpose. ROW_NUMBER function is one of the ranking function of SQL Server. Here is an example of ROW_NUMBER - SELECT * FROM (SELECT ROW_NUMBER() OVER(ORDER BY EmpID) AS Row, * FROM Employee AS tbl ) WHERE Row >= 1 AND Row <= 10 ROW_NUMBER is used for assigning sequential numbers to the records of record-set. In the above query a sequel number is assigned to each record of the Employee table. Here we have used following two clause - OVER clause - It is used for specifying the ordering of records before assigning the sequence to each record. ORDER clause -  In order clause we define column or columns which is used to order the records in the record-sets. In our case we have used EmpId with ORDER clause, so first each record of Employee table is first ordered  according to EmpId and then sequence number is assigned to e...

Debug Java code in Java COM windows application. (Remote Java debugging)

Hi, I recently got the chance to setup Java debug environment for Java-COM based windows application. Here the vb6 code is used for showing the User interface of application while Java and C++ code includes business logic of the application. To fix some bugs in the application a debug environment was required which allows users to debug Java and C++ JNI code. To debug C++, I used Visual studio attach to process method and for Java code remote Java debugging of eclispe was used. Here is the details of process that I used to debug Java- We need to implement following two steps - Launch the application and tell the JVM that it will be debugged remotely Create debug configuration in eclispe IDE to debug application remotely. (in our case it is localhost) Pass following argument to jvm - -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8998 The above code should be placed at the location where jvm is loaded in the code. Here 8998 denotes the port and suspen...

.NET Interview questions ( around 2 Years experience)

What are assemblies? What is the process to create shared assembly? Difference between abstract class and interface? What is multilevel inheritance? What are the steps to fetch data from a database table? We have 5 classes created in .NET. As per one of the customer requirement we need to change the  implementation of the function. How can we do that without changing existing class structure? What is the difference between managed and unmanaged code? What is the difference between httpmodules and httphandlers? What is operator overloading? Difference between DataList and Hashtable? Difference between Hashtable and Dictionary? I will update this post with the answers of above questions.