|
|
|
Saturday, 28 January 2012 01:38 |
// enable disable all the constraints of data base sql server
---For ENABLING
EXEC sp_MSforeachtable @command1="ALTER TABLE ? NOCHECK CONSTRAINT ALL"
---To DISABLE all the constraints
EXEC sp_MSforeachtable @command1="ALTER TABLE ? CHECK CONSTRAINT ALL"
GO
 Read more: |
|
|
Thursday, 15 December 2011 00:26 |
Here is the solution to enable/disable asp.net validation using javascript
Suppose i have dropdown which contain list of Asian countries and Other when user are selecting Other than only txtOtherCity is enbled else disable at that i disable required field validation for Other city (rfvOtherCity)
//Syntax:
ValidatorEnable(ValidatorContronName,Boolean);
//Explanation:
ValidatorContronName:This is ClientID of the Validation control.
Boolean:true(Enable) or false(Disable)
//Example:
ValidatorEnable(document.getElementById('<%=rfvOtherCity.ClientID%>'), false);
 Read more: |
|
Thursday, 25 November 2010 15:49 |
// This function disable your entire form. Its purpose is to disable a form field, in order for your ajax request to do its job without being disturbed.
"cond" is the condition. True will disable all your form, False will unlock it.
"myForm" is the ID of your
function DisableForm(myForm,cond){
var node_list = getElementById(myForm).getElementsByTagName('input');
for (var i = 0; i < node_list.length; i++) {
var node = node_list[i];
if (node.getAttribute('type') == 'checkbox' || node.getAttribute('type') == 'submit')
node.disabled = cond; else node.readOnly = cond;
}
};
 Read more: |
|
|
|
|
|
|