javaScript

function RegisterValidation() {

var valid = true;
var mob = /^[1-9]{1}[0-9]{9}$/;
var ZipCode = /^[1-9]{1}[0-9]$/;
var txtName = $(“#txt_Name”).val();
var txtEmail = $(“#txt_Email”).val();
var txtPassword = $(“#txt_Password”).val();
var txtConfPassword = $(“#txt_ConfirmPassword”).val();
var txtPhone = $(“#txt_Phone”).val();
var txtMobile = $(“#txt_Mobile”).val();
var txtRegistrationCity = $(“#txt_RegistrationCity”).val();
var txtRegistrationCountry = $(“#txt_RegistrationCountry”).val();
var txtRegistrationState = $(“#txt_RegistrationState”).val();
var txtZipCode = $(“#txt_ZipCode”).val();

if ((txtName) == “”
&& (txtEmail) == “”
&& (txtPassword) == “”
&& (txtConfPassword) == “”
&& (txtPhone) == “”
&& (txtMobile) == “”
&& (txtRegistrationCity) == “”
&& (txtRegistrationCountry) == “”
&& (txtRegistrationState) == “”
&& (txtZipCode) == “”) {
$(‘#txt_Name’).css(‘border-color’, ‘red’);
$(‘#txt_Email’).css(‘border-color’, ‘red’);
$(‘#txt_Password’).css(‘border-color’, ‘red’);
$(‘#txt_ConfirmPassword’).css(‘border-color’, ‘red’);
$(‘#txt_Phone’).css(‘border-color’, ‘red’);
$(‘#txt_Mobile’).css(‘border-color’, ‘red’);
$(‘#txt_RegistrationCity’).css(‘border-color’, ‘red’);
$(‘#txt_RegistrationCountry’).css(‘border-color’, ‘red’);
$(‘#txt_RegistrationState’).css(‘border-color’, ‘red’);
$(‘#txt_ZipCode’).css(‘border-color’, ‘red’);
valid = false;
$(“#txt_Name”).focus();
}
else if ($(‘#txt_Name’).val() == ”) {
$(‘#txt_Name’).css(‘border-color’, ‘red’);
$(“#txt_Name”).focus();
valid = false;
}
else if ($(‘#txt_Email’).val() == ”) {
$(‘#txt_Email’).css(‘border-color’, ‘red’);
$(“#txt_Email”).focus();
valid = false;
}
else if (!ValidateEmail($(‘#txt_Email’).val())) {
alert(‘Please Enter a valid Email id ‘);
$(‘#txt_Email’).css(‘border-color’, ‘red’);
$(“#txt_Email”).focus();
valid = false;
}
else if ($(‘#txt_Password’).val() == ”) {
$(‘#txt_Password’).css(‘border-color’, ‘red’);
$(“#txt_Password”).focus();
valid = false;
}
else if (!isValidPassword($(‘#txt_Password’).val())) {
alert(‘ Password Contains At least one Capital letter ,one Small letter, one numeric number,one Special Character And Minimum 8 and Maximum 16 ‘);
$(‘#txt_Password’).css(‘border-color’, ‘red’);
$(“#txt_Password”).focus();
valid = false;
}

else if ($(‘#txt_ConfirmPassword’).val() == ”) {
$(‘#txt_ConfirmPassword’).css(‘border-color’, ‘red’);
$(“#txt_ConfirmPassword”).focus();
valid = false;
}
else if (!(txtPassword == txtConfPassword)) {
alert(‘ Password Does not Match ‘);
$(‘#txt_Password’).css(‘border-color’, ‘red’);
$(“#txt_Password”).focus();
valid = false;
}
else if ($(‘#txt_Phone’).val() == ”) {
$(‘#txt_Phone’).css(‘border-color’, ‘red’);
$(“#txt_Phone”).focus();
valid = false;
}
else if (!mob.test($(‘#txt_Phone’).val())) {
alert(‘Please Enter Valid phone no’);
$(‘#txt_Phone’).css(‘border-color’, ‘red’);
$(“#txt_Phone”).focus();
valid = false;
}

else if ($(‘#txt_Mobile’).val() == ”) {
$(‘#txt_Mobile’).css(‘border-color’, ‘red’);
$(“#txt_Mobile”).focus();
valid = false;
}
else if (!mob.test($(‘#txt_Mobile’).val())) {
alert(‘Please Enter Valid Mobile no’);
$(‘#txt_Mobile’).css(‘border-color’, ‘red’);
$(“#txt_Mobile”).focus();
valid = false;
}

else if ($(‘#txt_RegistrationCity’).val() == ”) {
$(‘#txt_RegistrationCity’).css(‘border-color’, ‘red’);
$(“#txt_RegistrationCity”).focus();
valid = false;
}

else if ($(‘#txt_RegistrationCountry’).val() == ”) {
$(‘#txt_RegistrationCountry’).css(‘border-color’, ‘red’);
$(“#txt_RegistrationCountry”).focus();
valid = false;
}

else if ($(‘#txt_RegistrationState’).val() == ”) {
$(‘#txt_RegistrationState’).css(‘border-color’, ‘red’);
$(“#txt_RegistrationState”).focus();
valid = false;
}

else if ($(‘#txt_ZipCode’).val() == ”) {
$(‘#txt_ZipCode’).css(‘border-color’, ‘red’);
$(“#txt_ZipCode”).focus();
valid = false;
}

else if (valid) {
debugger;
//var aa = window.location.host;
var Email = $(“#txt_Email”).val();
//var url = “/LegalDocument/CheckEmailExist/”;
//var url = ‘http://’ + window.location.host + ‘/LegalDocument/CheckEmailExist’;
$(“#btnUserRegistration”).val(‘Plesae wait..’);
$(“#btnUserRegistration”).attr(“style”, “background:Gray”)
$(“#btnUserRegistration”).attr(“disabled”, true);
$.ajax({
url: ‘http://’ + window.location.host + ‘/LegalDocument/CheckEmailExist’,
data: { userId: Email },
cache: false,
type: “POST”,
success: function (data) {
debugger;
if (data == “userE”) {
alert(“user registration successfully”);
$(‘#SubmitData’).submit();

} else {
alert(“This Email id Already Exist in DataBase.”);
$(“#btnUserRegistration”).val(‘SIGNUP’);
$(“#btnUserRegistration”).attr(“style”, “background:rgba(0, 0, 0, 0) linear-gradient(to bottom, rgba(43, 59, 146, 1) 0%, rgba(24, 38, 117, 1) 100%) repeat scroll 0 0”)
$(“#btnUserRegistration”).attr(“disabled”, false);
return false;
}
$(“#txt_Email”).attr({ ‘value’: ” });

},
error: function (reponse) {
alert(“error : ” + reponse);
}
});

}

}

function UserEditValidation() {

var valid = true;
var mob = /^[1-9]{1}[0-9]{9}$/;
var ZipCode = /^[1-9]{1}[0-9]$/;
var txtName = $(“#txt_Name”).val();
var txtEmail = $(“#txt_Email”).val();
var txtAddress = $(“#txt_EditAddress”).val();
var txtRegistrationCity = $(“#txt_RegistrationCity”).val();
var txtRegistrationCountry = $(“#txt_RegistrationCountry”).val();
var txtRegistrationState = $(“#txt_RegistrationState”).val();
var txtZipCode = $(“#txt_ZipCode”).val();
var txtOldPassword = $(“#txt_OldPassword”).val();
var txtPassword = $(“#txt_Password”).val();
var txtConfPassword = $(“#txt_ConfirmPassword”).val();

if ((txtName) == “”
&& (txtEmail) == “”
&& (txtAddress) == “”
&& (txtRegistrationCity) == “”
&& (txtRegistrationCountry) == “”
&& (txtRegistrationState) == “”
&& (txtZipCode) == “”
) {
$(‘#txt_Name’).css(‘border-color’, ‘red’);
$(‘#txt_Email’).css(‘border-color’, ‘red’);
$(‘#txt_EditAddress’).css(‘border-color’, ‘red’);
$(‘#txt_RegistrationCity’).css(‘border-color’, ‘red’);
$(‘#txt_RegistrationCountry’).css(‘border-color’, ‘red’);
$(‘#txt_RegistrationState’).css(‘border-color’, ‘red’);
$(‘#txt_ZipCode’).css(‘border-color’, ‘red’);

valid = false;
$(“#txt_Name”).focus();
}
else if ($(‘#txt_Name’).val() == ”) {
$(‘#txt_Name’).css(‘border-color’, ‘red’);
$(“#txt_Name”).focus();
valid = false;
}
else if ($(‘#txt_Email’).val() == ”) {
$(‘#txt_Email’).css(‘border-color’, ‘red’);
$(“#txt_Email”).focus();
valid = false;
}
else if (!ValidateEmail($(‘#txt_Email’).val())) {
alert(‘Please Enter a valid Email id ‘);
$(‘#txt_Email’).css(‘border-color’, ‘red’);
$(“#txt_Email”).focus();
valid = false;
}

else if ($(‘#txt_EditAddress’).val() == ”) {
$(‘#txt_EditAddress’).css(‘border-color’, ‘red’);
$(“#txt_EditAddress”).focus();
valid = false;
}
else if ($(‘#txt_RegistrationCity’).val() == ”) {
$(‘#txt_RegistrationCity’).css(‘border-color’, ‘red’);
$(“#txt_RegistrationCity”).focus();
valid = false;
}

else if ($(‘#txt_RegistrationCountry’).val() == ”) {
$(‘#txt_RegistrationCountry’).css(‘border-color’, ‘red’);
$(“#txt_RegistrationCountry”).focus();
valid = false;
}

else if ($(‘#txt_RegistrationState’).val() == ”) {
$(‘#txt_RegistrationState’).css(‘border-color’, ‘red’);
$(“#txt_RegistrationState”).focus();
valid = false;
}

else if ($(‘#txt_ZipCode’).val() == ”) {
$(‘#txt_ZipCode’).css(‘border-color’, ‘red’);
$(“#txt_ZipCode”).focus();
valid = false;
}

else if ($(‘#txt_OldPassword’).val() != ” || ($(‘#txt_Password’).val() != ”)) {
if ($(‘#txt_Password’).val() == ”) {
$(‘#txt_Password’).css(‘border-color’, ‘red’);
$(“#txt_Password”).focus();
valid = false;
}
else if ($(‘#txt_ConfirmPassword’).val() == ”) {
$(‘#txt_ConfirmPassword’).css(‘border-color’, ‘red’);
$(“#txt_ConfirmPassword”).focus();
valid = false;
}
else if (!isValidPassword($(‘#txt_Password’).val())) {
alert(‘ Password Contains At least one Capital letter ,one Small letter, one numeric number,one Special Character And Minimum 8 and Maximum 16 ‘);
$(‘#txt_Password’).css(‘border-color’, ‘red’);
$(“#txt_Password”).focus();
valid = false;
}
else if (!(txtPassword == txtConfPassword)) {
alert(‘ Password Does not Match ‘);
$(‘#txt_Password’).css(‘border-color’, ‘red’);
$(“#txt_Password”).focus();
valid = false;
}
else if (valid) {
debugger;
var Password = $(“#txt_OldPassword”).val();
//var url = “/LegalDocument/CheckPasswordExist/”;
//var url = ‘http://’ + window.location.host + ‘/LegalDocument/CheckPasswordExist’;
// var url = ‘(@System.Configuration.ConfigurationManager.AppSettings[“PageURL”])LegalDocument/CheckPasswordExist’;
$(“#btnUserEdit”).val(‘Plesae wait..’);
$(“#btnUserEdit”).attr(“style”, “background:Gray”)
$(“#btnUserEdit”).attr(“disabled”, true);
$.ajax({
url: ‘http://’ + window.location.host + ‘/LegalDocument/CheckPasswordExist’,
data: { pass: Password },
cache: false,
type: “POST”,
success: function (data) {

if (data == “userE”) {
alert(“This old Password not Exist in DataBase.”);
$(“#btnUserEdit”).val();
return false;
} else {
alert(“user Information Update successfully”);
$(‘#SubmitUserData’).submit(‘UPDATE’);
$(“#SubmitUserData”).attr(“style”, “background:rgba(0, 0, 0, 0) linear-gradient(to bottom, rgba(43, 59, 146, 1) 0%, rgba(24, 38, 117, 1) 100%) repeat scroll 0 0”)
$(“#SubmitUserData”).attr(“disabled”, false);
}
$(“#txt_OldPassword”).attr({ ‘value’: ” });

},
error: function (reponse) {
alert(“error : ” + reponse);
}
});
}

}

else {

alert(“user Information Update successfully”);
$(‘#SubmitUserData’).submit();
}
}

function verifydocumentValidation() {

var valid = true;
var txtCaseno = $(“#txtCaseno”).val();
var txtCourt = $(“#txtCourt”).val();
var txtFirstName = $(“#txtFirstName”).val();
var txtLastName = $(“#txtLastName”).val();
var txtAddress = $(“#txtAddress”).val();
var txtRegistrationCity = $(“#txtRegistrationCity”).val();
var txtRegistrationState = $(“#txt_RegistrationState”).val();
var txtZipCode = $(“#txtZipCode”).val();
var txtRegistrationCountry = $(“#txt_RegistrationCountry”).val();
var txtDateofArrest = $(“#txtDateofArrest”).val();
var txtOffense = $(“#txtOffense”).val();
var txtLengthofSupervison = $(“#txtLengthofSupervison”).val();
var txtSupEndDate = $(“#txtSupEndDate”).val();

if ((txtCaseno) == “”
&& (txtCourt) == “”
&& (txtFirstName) == “”
&& (txtLastName) == “”
&& (txtAddress) == “”
&& (txtRegistrationCity) == “”
&& (txtRegistrationState) == “”
&& (txtZipCode) == “”
&& (txtRegistrationCountry) == “”
&& (txtDateofArrest) == “”
&& (txtOffense) == “”
&& (txtLengthofSupervison) == “”
&& (txtSupEndDate) == “”
) {
$(‘#txtCaseno’).css(‘border-color’, ‘red’);
$(‘#txtCourt’).css(‘border-color’, ‘red’);
$(‘#txtFirstName’).css(‘border-color’, ‘red’);
$(‘#txtLastName’).css(‘border-color’, ‘red’);
$(‘#txtAddress’).css(‘border-color’, ‘red’);
$(‘#txt_RegistrationCity’).css(‘border-color’, ‘red’);
$(‘#txt_RegistrationState’).css(‘border-color’, ‘red’);
$(‘#txt_ZipCode’).css(‘border-color’, ‘red’);
$(‘#txt_RegistrationCountry’).css(‘border-color’, ‘red’);
$(‘#txtDateofArrest’).css(‘border-color’, ‘red’);
$(‘#txtOffense’).css(‘border-color’, ‘red’);
$(‘#txtLengthofSupervison’).css(‘border-color’, ‘red’);
$(‘#txtSupEndDate’).css(‘border-color’, ‘red’);

valid = false;
$(“#txtCaseno”).focus();
}

else if ($(‘#txtCaseno’).val() == ”) {
$(‘#txtCaseno’).css(‘border-color’, ‘red’);
$(“#txtCaseno”).focus();
valid = false;
}
else if ($(‘#txtCourt’).val() == ”) {
$(‘#txtCourt’).css(‘border-color’, ‘red’);
$(“#txtCourt”).focus();
valid = false;
}

else if ($(‘#txtFirstName’).val() == ”) {
$(‘#txtFirstName’).css(‘border-color’, ‘red’);
$(“#txtFirstName”).focus();
valid = false;
}

else if ($(‘#txtLastName’).val() == ”) {
$(‘#txtLastName’).css(‘border-color’, ‘red’);
$(“#txtLastName”).focus();
valid = false;
}

else if ($(‘#txtAddress’).val() == ”) {
$(‘#txtAddress’).css(‘border-color’, ‘red’);
$(“#txtAddress”).focus();
valid = false;
}

else if ($(‘#txt_RegistrationCity’).val() == ”) {
$(‘#txt_RegistrationCity’).css(‘border-color’, ‘red’);
$(“#txt_RegistrationCity”).focus();
valid = false;
}
else if ($(‘#txt_RegistrationState’).val() == ”) {
$(‘#txt_RegistrationState’).css(‘border-color’, ‘red’);
$(“#txt_RegistrationState”).focus();
valid = false;
}
else if ($(‘#txt_ZipCode’).val() == ”) {
$(‘#txt_ZipCode’).css(‘border-color’, ‘red’);
$(“#txt_ZipCode”).focus();
valid = false;
}

else if ($(‘#txt_RegistrationCountry’).val() == ”) {
$(‘#txt_RegistrationCountry’).css(‘border-color’, ‘red’);
$(“#txt_RegistrationCountry”).focus();
valid = false;
}
else if ($(‘#txtDateofArrest’).val() == ”) {
$(‘#txtDateofArrest’).css(‘border-color’, ‘red’);
$(“#txtDateofArrest”).focus();
valid = false;
}
else if ($(‘#txtOffense’).val() == ”) {
$(‘#txtOffense’).css(‘border-color’, ‘red’);
$(“#txtOffense”).focus();
valid = false;
}
else if ($(‘#txtLengthofSupervison’).val() == ”) {
$(‘#txtLengthofSupervison’).css(‘border-color’, ‘red’);
$(“#txtLengthofSupervison”).focus();
valid = false;
}
else if ($(‘#txtSupEndDate’).val() == ”) {
$(‘#txtSupEndDate’).css(‘border-color’, ‘red’);
$(“#txtSupEndDate”).focus();
valid = false;
}

else if (valid) {
//var url = “/LegalDocument/VerifyDocument/”;
//var url = ‘(@System.Configuration.ConfigurationManager.AppSettings[“PageURL”])LegalDocument/VerifyDocument’;
//var url: ‘http://’ + window.location.host + ‘/LegalDocument/Logoutmethod’,
$(“#btnUserRegistration”).val(‘Plesae wait..’);
$(“#btnUserRegistration”).attr(“style”, “background:Gray”)
$(“#btnUserRegistration”).attr(“disabled”, true);
$.ajax({
url: ‘http://’ + window.location.host + ‘/LegalDocument/VerifyDocument’,
data: { Caseno: txtCaseno, Court: txtCourt, FName: txtFirstName, LName: txtLastName, Address: txtAddress, RCity: txtRegistrationCity, RState: txtRegistrationState, Zipcode: txtZipCode, RCountry: txtRegistrationCountry, DoArrest: txtDateofArrest, Offense: txtOffense, LoSupervison: txtLengthofSupervison, SEDate: txtSupEndDate },
cache: false,
type: “POST”,
success: function (data) {
debugger;
if (data == “userE”) {
alert(“user registration successfully”);
$(‘#SubmitData’).submit();

} else {
alert(“This Email id Already Exist in DataBase.”);
$(“#btnUserRegistration”).val(‘SIGNUP’);
$(“#btnUserRegistration”).attr(“style”, “background:rgba(0, 0, 0, 0) linear-gradient(to bottom, rgba(43, 59, 146, 1) 0%, rgba(24, 38, 117, 1) 100%) repeat scroll 0 0”)
$(“#btnUserRegistration”).attr(“disabled”, false);
return false;
}
$(“#txt_Email”).attr({ ‘value’: ” });

},
error: function (reponse) {
alert(“error : ” + reponse);
}
});

}

}

function ContactUsValidate() {
var valid = true;
var mob = /^[1-9]{1}[0-9]{9}$/;

debugger;
if ($(“#txtName”).val() == “”
&& $(“#txtEmail”).val() == “”
&& $(“#txtPhoneNo”).val() == “”
&& $(“#AreatxtMessage”).val() == “”) {
$(‘#txtName’).css(‘border-color’, ‘red’);
$(‘#txtEmail’).css(‘border-color’, ‘red’);
$(‘#txtPhoneNo’).css(‘border-color’, ‘red’)
$(‘#AreatxtMessage’).css(‘border-color’, ‘red’);
valid = false;
$(“#txtName”).focus();
}
else if ($(“#txtName”).val() == “”) {
$(‘#txtName’).css(‘border-color’, ‘red’);
$(“#txtName”).focus();
valid = false;

}
else if ($(“#txtEmail”).val() == “”) {
$(‘#txtEmail’).css(‘border-color’, ‘red’);
$(“#txtEmail”).focus();
valid = false;
}
else if (!ValidateLoginEmail($(“#txtEmail”).val())) {
alert(“Please Enter a valid Email id”);
$(‘#txtEmail’).css(‘border-color’, ‘red’);
$(“#txtEmail”).focus();
valid = false
}
else if ($(“#txtPhoneNo”).val() == “”) {
$(‘#txtPhoneNo’).css(‘border-color’, ‘red’);
$(“#txtPhoneNo”).focus();
valid = false;

}
else if (!mob.test($(‘#txtPhoneNo’).val())) {
alert(‘Please Enter Valid Phone no’);
$(‘#txtPhoneNo’).css(‘border-color’, ‘red’);
$(“#txtPhoneNo”).focus();
valid = false;
}
else if ($(‘#AreatxtMessage’).val() == “”) {
$(‘#AreatxtMessage’).css(‘border-color’, ‘red’);
$(“#AreatxtMessage”).focus();
valid = false;
}
else if ($(‘#AreatxtMessage’).val() != “”) {
var min = 100;
var len = $(‘#AreatxtMessage’).val().length;
if (len 64 && charCode 96 && charCode = 48 && charCode = 65 && charCode = 97 && charCode = 48 && charCode <= 57) || charCode == 8
|| charCode == 127 || charCode == 32 || charCode == 0 || charCode == 11)
return true;
else
alert('Please Enter only Numeric number ')
return false;
}
catch (err) {
alert(err.Description);
}
}

function removeLoginsession() {
debugger;

//var url1 = '@System.Configuration.ConfigurationManager.AppSettings["PageURL"]/LegalDocument/Logoutmethod';
//var url2 = '@System.Configuration.ConfigurationManager.AppSettings["PageURL"]/LegalDocument/Index';
//url1 = '../../LegalDocument/Logoutmethod';
//url2 = '../../LegalDocument/Index';
$.ajax({

//url: url1,
url: 'http://&#039; + window.location.host + '/LegalDocument/Logoutmethod',
cache: false,
type: "POST",
success: function (data) {
window.location.href = 'http://&#039; + window.location.host + '/LegalDocument/Index';
//url: 'http://&#039; + window.location.host + '/LegalDocument/Index';
},
error: function (reponse) {
alert("error : " + reponse);
}
});
}

jQuery Funcation

JQuery Login
http://www.aspdotnet-pools.com/2014/09/ajax-login-form-using-jquery-in-aspnet.html
JQuery logout
==================================================================================================
http://stackoverflow.com/questions/11700463/logout-in-mvc-using-session-without-javascript-jquery
————————————————————————————————–
@{
ViewBag.Title = “LogOut”;
Layout = “~/Views/Shared/_Layout.cshtml”;
}

LogOut

public ActionResult LogOut()
{
FormsAuthentication.SignOut();
return RedirectToAction(“Index”, “Home”);
}
===============================================================================
Logout

public ViewResult Logout()
{
Session.Abandon();
return View(“Index”, “Home”);
}
================================================================================
Rememberme
================================================================================
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies[“Remember”] != null)
{
HttpCookie cookieRemember = Request.Cookies.Get(“Remember”);
txtEmail.Text = cookieRemember.Values[“Email”];
txtPassword.Text = cookieRemember.Values[“Password”];
Response.Cookies[“Remember”].Expires = DateTime.Now;
}
}
protected void btnLogin_Click(object sender, EventArgs e)
{
bool result = VerifyAccount(txtEmail.Text, txtPassword.Text);

if (result == true)
{
if (ChkRemember.Checked)
{
HttpCookie cookieRemember = new HttpCookie(“Remember”);
cookieRemember.Values.Add(“Email”, txtEmail.Text);
cookieRemember.Values.Add(“Password”, txtPassword.Text);
cookieRemember.Expires = DateTime.Now.AddDays(10);
Response.Cookies.Add(cookieRemember);
}
Response.Redirect(“UserPage.aspx”);
}
else
{
lblMessage.Text = “Sorry you cannot login, please provide correct Email and password”;
}
}
=======================================================================================
forget password
http://www.itorian.com/2013/03/PasswordResetting.html

http://www.code-sample.com/2014/08/forgot-password-in-mvc-5-aspnet.html
=======================================================================================
//Count character lenght of message
=================================================================================


(Minimum 100 characters)

Query function

$(‘#characterLeft’).text(‘500 characters left’);
$(‘#AreatxtMessage’).keyup(function () {
var min= 100;
var max = 500;
var len = $(this).val().length;
if (len >= max) {
$(‘#characterLeft’).text(‘ you have reached the limit’);
} else {
var ch = max – len;

$(‘#characterLeft’).text(ch + ‘ characters left’);
}
});

css class

.RemLab {margin-left:660px;}

================================================================================================================
SaveImage jquery
===============================================================================================================
function SaveImage(input) {

var fileUpload1 = $(input).get(0);
var files1 = fileUpload1.files;
if (files1.length > 0) {

//var files1 = fileUpload1.files;
var D_Name1 = fileUpload1.files[0].name;
if ((D_Name1 != null) || (D_Name1 != “”)) {
var FileExtension1 = checkFileExtension(D_Name1);
if (FileExtension1 == ‘png’ || FileExtension1 == ‘jpg’ || FileExtension1 == ‘jpeg’) {
var data1 = new FormData();
for (var i = 0; i < files1.length; i++) {
data1.append(files1[i].name, files1[i]);
}
$.ajax({
type: 'POST',
processData: false,
contentType: false,
cache: true,
data: data1,
async: false,
url: "/Content/Handler/UploadImage.ashx?files=" + D_Name1,
success: function (response) {
debugger
if (response == null) {
return false;
}
else {

var a = "/Content/Upload/FullSizeUserImage/" + response;
$('#abc').attr('src', a);
$('#imguserprofile').attr('src', a);
SaveImageName(response);

}
}
});
}
else {
alert(FileExtension1 + ' File type is not supported');
return false;
}
}
==============================================================================================
hrf link
==============================================================================================
// window.location.href = 'http://&#039; + window.location.host + '/LegalDocument/Index';
// url: 'http://&#039; + window.location.host + '/LegalDocument/Logoutmethod',
// window.location.href = Url.Action("ContactUs", "LegalDocument");
//Url.Action("ContactUs", "LegalDocument")
//url: '@System.Configuration.ConfigurationManager.AppSettings["PageURL"]' + LegalDocument / Index;
//
//window.location.href = “http://localhost:51507/LegalDocument/Index&#8221;;

loader

// function for loader
//function show_progress() {

// var maindiv = document.createElement(‘div’);
// maindiv.id = ‘functionjsprogressdiv’;
// var divprogress = document.createElement(‘div’);
// divprogress.setAttribute(‘style’, ‘position: fixed; top: 0px; left: 0px; background-color: white; width: 100%; height: 100%; z-index: 99999; opacity: 0.4; filter: alpha(opacity=80); -moz-opacity: 0.8; -khtml-opacity: 0.8; -moz-opacity: 0.8; padding-top: 200px;text-align:center;’);
// var divprogressimg = document.createElement(‘div’);
// divprogressimg.setAttribute(‘style’, ‘width: 100%; position: fixed; height: 1px; top: 2px; left: 0px; z-index: 999999; padding-top: 400px;text-align:center;’);
// divprogressimg.innerHTML = ‘<img alt=”” src=”../../Content/images/loading.gif” width=”30px” style=”opacity:0.6″/>’;
// maindiv.appendChild(divprogress);
// maindiv.appendChild(divprogressimg);
// document.body.appendChild(maindiv);
//}
//function hide_progress() {

// document.body.removeChild(document.getElementById(‘functionjsprogressdiv’));
// }

Mvc Link

//Convert data type in SSIS packages

//ssis class

http://www.mssqltips.com/newsletterconfirmation.asp

https://msdn.microsoft.com/en-us/library/ms141704.aspx

http://milambda.blogspot.in/2014/02/sql-server-integration-services-data.html

//dynamic Connection String.

http://sql-bi-dev.blogspot.in/2010/07/dynamic-database-connection-using-ssis.html

http://www.sanssql.com/2011/08/looping-through-sql-servers-using-ssis.html

// deployment a ssis packages
https://thebipalace.wordpress.com/2011/03/13/ssis-sql-server-and-file-system-deployment/

http://www.bibits.co/post/2010/09/24/SQL-SERVER-INTEGRATION-SERVICES-e28093-Package-Deployment.aspx

//how i create a job in sql

http://stackoverflow.com/questions/6712811/how-do-i-create-a-step-in-my-sql-server-agent-job-which-will-run-my-ssis-package/6713464#6713464

//Pass A variable in SSIS Packages through a Job Scheduler

http://jeffprom.com/2010/08/30/passing-parameters-into-ssis-from-a-sql-job/