Tuesday, November 26, 2013

Clearing a validation message from a Validator control of ASP.Net

In many situations we may land in a position to clear the validation messages raised by a Validator control, in a Javascript. Say for example a Required field validator raising a message "Please select any option".

If we need to clear the validation message from JavaScript, most of them will try the below code

document.getElementById('RequiredFieldValidatorClientID').innerHTML='';

If we use this line to clear the warning message, then this 'RequiredFieldValidator' will never display the validation message again. So, we have to set the CSS property "display" to "none".

document.getElementById('RequiredFieldValidatorClientID').style.display = "none";

In JQuery

$('#RequiredFieldValidatorClientID').css('display', 'none');

Sunday, November 10, 2013

Doing a project over the night

I came across this, and I just want to share this as anyone tries to develop any software application over the night, then it will be a night mare for them and the clients too.

My friend came with a project. He needs to complete it asap. But he does not have any plan. Not even project start date or end date. He is saying that he want it to be completed as soon as possible. 
And he is trying to convince that this project is very easy to develop.

It’s actually a conversion from legacy application to latest technology web application. But he is not approaching in a right way. Not even trying to understand anything.

It seems he approached a free lancer to develop this application and they agreed to develop in 10 days. It’s almost 10 days gone; still my friend does not see any good progress from them.

He does not have any design document too. Software development is not a production unit to get the desired objects from a machine after setting the basic dimensions.

At least we should have the following phases, if we follow agile as much as possible.
  • Project foundation phase
  • Coming out with planned dates
  • Starting Iterations, Scrums, Time boxes and whatever you call
  • Having regular client interactions and showcase
  • Releasing the developed application for User Acceptance Test
  • Re touching the developed application based on the review from UAT
  • Releasing to the client as beta or in any name
  • Finally, Go Live!!!
Guys, please follow some plans if you really want to develop any application and you do not want to end up with messes. 


Tuesday, October 22, 2013

Javascript - Interview Question

What will happen if the below JavaScript code executed?


function isEqual(a, b){
if(a=b){
return true;
} else {
return false;
}
}

isEqual(10,5);
isEqual(1,3);

Is this code valid? Most of the developers do this kind of mistake. It will return true for all the values. Also, the value of variable 'b' will be assigned to the variable 'a'.