Project Charter

1. Clear communication: The project charter helps establish clear communication between all parties involved, ensuring that everyone is on the same page regarding project goals, timelines, and expectations.

2. Scope definition: It defines the scope of the project, outlining what will be included and what will be excluded. This helps to prevent scope creep and ensures that the project stays focused and within its defined boundaries.

3. Stakeholder alignment: The project charter helps in aligning all stakeholders by clearly identifying their roles, responsibilities, and expectations. This reduces confusion and minimizes conflicts during the project execution.

4. Risk management: By identifying potential risks and constraints, the project charter allows for proactive risk management. This helps to mitigate risks and develop contingency plans, ensuring the project stays on track even in challenging circumstances.

5. Resource allocation: The project charter specifies the necessary resources, such as human resources, budget, and equipment, required for the project. This aids in efficient resource allocation and utilization throughout the project lifecycle.

6. Project justification: The project charter provides a justification for the project, highlighting its benefits, goals, and expected outcomes. This helps stakeholders understand the purpose and value of the project, ensuring their support and investment.

7. Compliance with SDLC: The project charter ensures compliance with the Software Development Life Cycle (SDLC) by providing a formal document that outlines the project’s initiation and planning phases. This helps in maintaining a structured approach to project execution.

8. PMP exam preparation: The project charter is an essential topic covered in the Project Management Professional (PMP) exam. Familiarity with project charters and their importance helps PMP exam takers understand project management principles and best practices.

Is your WordPress site redirect to another URL?

Your WordPress site and admin panel/dashboard redirect to another unknown URL then it is hacked and affected with trojan malware.

How WordPress website get hacked? 

  • Poor passwords and compromised user accounts
  • XSS scripting attacks
  • backdoors in nulled themes and plugins
  • vulnerabilities in plugins and themes

How to prevent WordPress redirect hacks? 

  • Install security plugin
  • Use strong passwords on website and database
  • SSL certificates apply to the website
  • Use trusted plugins only

How to resolve redirection to another URL? 

  • run the malware scan on your server. For Linux, the EST endpoint is a good one. Remove virus/malware from the server.
  • Remove all comments from unknown users/spam
  • Check the WP_Options table. Remove all the records which not added by WordPress by default and you. Also, correct the URLs in the “home” and “site” records.
  • Also,, check that any plugins installed that you don’t recognize, remove it. Check the header and footer file and if find any unknown script / malicious script remove it.

Every day the redirects malware coming with a new Avtar. So, the best way is to install a good security plugin and installed only trusted plugins for the website.

Create a custom autocomplete control in ASP.NET MVC

How to create a custom HTML control in ASP.NET MVC?

using System;
using System.Web.Mvc;

namespace MvcApplication1.Helpers
     public static class LabelExtensions
          public static string Label(this HtmlHelper helper, string target, string text)
               return String.Format("", target, text);

Refer link:

Auto complete custom control: Download


Nth Highest Salary

Create table #tblEmployee (Id int, [Name] varchar(100), City varchar(100), Salary decimal (10,3))
Insert into #tblEmployee values(1, 'Prakash Rathod', 'Gandhinagar', 100000)
Insert into #tblEmployee values(2, 'Salman Khan', 'Mumbai', 100000)
Insert into #tblEmployee values(3, 'Aamir Khan', 'Mumbai', 90000)
Insert into #tblEmployee values(4, 'Katrina Kaif', 'Mumbai', 80000)
Insert into #tblEmployee values(5, 'Rashmi Bansal', 'Indor', 95500)
Insert into #tblEmployee values(6, 'Jinen Kothari', 'Ahmedabad', 60000)
Insert into #tblEmployee values(7, 'Deepika Patel', 'Gandhinagar', 60000)
Insert into #tblEmployee values(8, 'Ranbir Singh', 'Gandhinagar', 36000)
Insert into #tblEmployee values(9, 'Mohini Trivedi', 'Ahmedabad', 25000)
Insert into #tblEmployee values(10, 'Jalpa Patel', 'Surat', 100000)
Insert into #tblEmployee values(11, 'Kruti Patel', 'Surat', 100000)
Insert into #tblEmployee values(12, 'Viral Zala', 'Surat', 100000)
Insert into #tblEmployee values(13, 'Dipbha Parmar', 'Surat', 100000)
Insert into #tblEmployee values(14, 'Jagubha Chotu', 'Gandhinagar', 100000)
Insert into #tblEmployee values(15, 'Kailashba Rathod', 'Surat', 100000)
select * from #tblEmployee

--2nd hightest salary
--SELECT top 1 Salary FROM #tblEmployee
--WHERE Salary < (select max(salary) from #tblEmployee ) ;With Result As ( select salary, DENSE_RANK() over (order by salary desc) as RowNumber from #tblEmployee ) select salary from result where RowNumber=1 drop table #tblEmployee

Generate x509 certificate in pem, cer and pfx and export public key

Generate x509 cerntifcate

c:\Demo>openssl req -x509 -days 365 -newkey rsa:2048 -keyout my-key.pem -out -my-cert.pem

Generating a RSA private key
writing new private key to ‘my-key.pem’
Enter PEM pass phrase:
Verifying – Enter PEM pass phrase:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
Country Name (2 letter code) [AU]:IN
State or Province Name (full name) [Some-State]:Gujarat
Locality Name (eg, city) []:Gandhinagar
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Your Company Name
Organizational Unit Name (eg, section) []:Development
Common Name (e.g. server FQDN or YOUR name) []
Email Address []

Generate .PFX file

c:\Demo>openssl pkcs12 -export -in -my-cert.pem -inkey my-key.pem -out my-xero.pfx
Enter pass phrase for my-key.pem:
Enter Export Password:
Verifying - Enter Export Password:

Generate .cer certificate

c:\Demo>openssl pkcs12 -export -in -my-cert.pem -inkey my-key.pem -out my-xero.cer
Enter pass phrase for my-key.pem:
Enter Export Password:
Verifying - Enter Export Password:

Export public key

c:\Demo>openssl pkcs12 -in my-xero.pfx -clcerts -nokeys -out myxeropublic.cer
Enter Import Password:


Send an image (stored as base64 string) inline in email

Byte[] bitmapData = Convert.FromBase64String(FixBase64ForImage("Base64 string"));
System.IO.MemoryStream streamBitmap = new System.IO.MemoryStream(bitmapData);
var imageToInline = new LinkedResource(streamBitmap, MediaTypeNames.Image.Jpeg);
imageToInline.ContentId = "Pic1";
AlternateView avHtml = AlternateView.CreateAlternateViewFromString(mailMessage.Body, null, MediaTypeNames.Text.Html);

public static string FixBase64ForImage(string Image)
System.Text.StringBuilder sbText = new System.Text.StringBuilder(Image, Image.Length);
sbText.Replace("\r\n", string.Empty); sbText.Replace(" ", string.Empty);
return sbText.ToString();

Put/Delete http verb not working server

Please add following code in web.cofig file.

			<remove name="WebDAVModule"/>
			<remove name="FormsAuthentication" />
			<remove name="ApplicationInsightsWebTracking" />
			<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
			<remove name="WebDAV" />
			<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
			<remove name="OPTIONSVerbHandler" />
			<remove name="TRACEVerbHandler" />
			<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

If not solve then please follow link.

Dynamically add rows and html controls in table using jQuery

How to add rows dynamically in HTML table with textbox and textarea controls. Example: Download

<title>Table Dynamic Row Add Delete Demo</title>
<script src=""
<table id="tbl1">
<input type="text" id="txtFamil_01" name="txtFamily_01" />
<input type="text" id="txtAddress_01" name="txtAddress_01" />
<textarea id="txtFamil_02" name="txtFamily_02"></textarea>
<textarea id="txtAddress_02" name="txtAddress_02"></textarea>
<br />
<button type="button" id="btnAddNewRow">Add New Row</button>
<button type="button" id="btnSave" name="btnSave">Save</button>
<script type="text/javascript">
$(document).ready(function () {
$("#btnAddNewRow").on("click", function () {

var $newRows = $get_lastID();



$get_lastID = function () {
var $id = $(‘#tbl1 tbody tr:last-child td:first-child textarea’).attr(“name”);
$lastChar = parseInt($id.substr($id.length – 2), 10);
$lastChar = $lastChar + 1;
var $newRows=””;
$newRow1 = “<tr> \
<td><input type=’text’ name=’txtFamily_0″+ $lastChar + “‘ /></td> \
<td><input type=’text’ name=’txtAddress_0” + $lastChar + “‘ /></td> \ </tr>”

$newRow2 = “<tr> \
<td><textarea type=’text’ name=’txtFamily_0″+ ($lastChar + 1) + “‘></textarea></td> \
<td><textarea type=’text’ name=’txtAddress_0” + ($lastChar + 1) + “‘></textarea></td> \ </tr>”

$newRows = $newRow1+$newRow2;

return $newRows;

$(“#btnSave”).on(“click”, function () {
$(“#tbl1 tbody tr”).each(function (i, tr) {

var famil1, famil2, address1, address2;

if (i % 2 === 0) { /* textbox find here*/
famil1 = $(this).find(‘td’).eq(0).find(‘input’).val();
famil2 = $(this).find(‘td’).eq(1).find(‘input’).val();
alert(famil1 + ” ” + famil2);
else { /* textarea find here */

address1 = $(this).find(‘td’).eq(0).find(‘textarea’).val();
address2 = $(this).find(‘td’).eq(1).find(‘textarea’).val();
alert(address1 + ” ” + address2);




CSS style problem with MVC rendered checkboxes using MVC helper

I have faced the issue with CSS for checkboxes in mvc. Below is mvc code.

 @Html.CheckBoxFor(model => model.GroupClosed)
  <label for="GroupClosed" class="block">
                            Group Closed

It will render as below:

 <div class="checkbox clip-check check-primary">
                        <span class="control-label" style="color:white">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                        <input id="GroupClosed" name="GroupClosed" type="checkbox" value="true"><input name="GroupClosed" type="hidden" value="false">
                        <label for="GroupClosed" class="block">
                            Group Closed

Before modify the css file as below.

.clip-check input[type="checkbox"]:checked + label:before,
  border-width: 10px;

After modify:

.clip-check input[type="checkbox"]:checked + label:before,
.clip-check  input[type="checkbox"]:checked + input[type="hidden"] + label::before {
  border-width: 10px;

Note that the bold line contains the input[type=”hidden”] which identifies the hidden checkbox and solve the issue. I have added this line and make changes according to css has been written in css file. Happy 🙂