I have a gridview with 6 columns(SAPUserID ,SAPDescription,SAPPassword,OSUserID,OSDescription,OSPassword) and a CHANGE PASSWORD button. After clicking this button the panel (pnlChangePwd) below the grid view becomes visible containing 3 textboxes(User ID, New Password, Confirm Password) and a Save button.At present if i type new password same as old one, it accepts. how to compare the value in txtNewPassword with cell value of SAPPassword or OSPassword in grid view?
Note: at a time only 3 columns are visible depending upon the data user want(SAP or OS )
Please help..
Loading

brunda kRank #3,804 · 389 reputationPosted Jun 6, 2012, 10:49 PM EDT
function ValPSW()
{
var Grid_Table = document.getElementById('<%= GridView1.ClientID %>');
var pswText = document.getElementById('<%= pswTxt.ClientID %>');
var usrText = document.getElementById('<%= usrTxt.ClientID %>');
for(var row=1; row
{ for(var col=0; col
if(Grid_Table.rows[row].cells[0] == usrText.value) && (Grid_Table.rows[row].cells[1] == pswText.value)
alert("please enter a new password for ":usrText.value);
return false;
}
}
}
Abumiyan Muqri43 reputationPosted Jun 6, 2012, 11:37 PM EDT
Please check my edited question..
brunda kRank #3,804 · 389 reputationPosted Jun 7, 2012, 1:02 AM EDT
Actually, for the first query of your the suggestion would be we can validate the password/text data wrt to gridview in javascript
Abumiyan Muqri43 reputationPosted Jun 7, 2012, 1:26 AM EDT
brunda kRank #3,804 · 389 reputationPosted Jun 7, 2012, 2:31 AM EDT
http://www.c-sharpcorner.com/uploadfile/purankaushal/client-side-validation-of-gridview-control-with-javascript/