Click here to Skip to main content
15,923,689 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: In datagrid digit values......... Pin
Sun Rays17-Mar-07 1:21
Sun Rays17-Mar-07 1:21 
GeneralRe: In datagrid digit values......... Pin
Member 387988117-Mar-07 1:41
Member 387988117-Mar-07 1:41 
Questionpage body loading in ASP .NET Pin
jithbiz003317-Mar-07 0:20
jithbiz003317-Mar-07 0:20 
AnswerRe: page body loading in ASP .NET Pin
Sun Rays17-Mar-07 0:39
Sun Rays17-Mar-07 0:39 
AnswerRe: page body loading in ASP .NET Pin
Ziyad Mohammad18-Mar-07 20:26
Ziyad Mohammad18-Mar-07 20:26 
Questionweb service hashtable Pin
biaali17-Mar-07 0:10
biaali17-Mar-07 0:10 
QuestionDisable all controls in a form! Pin
gauthee16-Mar-07 23:30
gauthee16-Mar-07 23:30 
AnswerRe: Disable all controls in a form! [modified] Pin
Arindam Tewary17-Mar-07 2:19
professionalArindam Tewary17-Mar-07 2:19 
Dear gauthee,
If you can create a base page that also serves the same purpose.

But there is a way out using Javascript to disable all the controls ....
use "getElementsByTagName()" DOM function.

How to do it:
===========================================================
When all the control is rendered it generates HTML control in browser.

So in your rendered page you get
<input type="textbox" ....>
<input type="chekbox" ....>
<input type="button" ....>

instead of
<asp:textbox...> or <asp:checkbox...>


So you can write a javascript function that will
1. First collect all the IDs of controls having tag name as
2. Iterate through the array of IDs and set the 'disabled' property of all the control.

The javacript function may look like this one.
function DisableAllControls()
{
    var arrControls = document.getElementByTagName('input') 
    // since we are trying to gather all controls having <input> tag 
    // returns an array of control's ID ..so each array
    // element is a control of your page.
        
    for(int i=0;iterate upto arrControls.length)
    {
        arrControls[i].disabled = true;
    }
    // setting each control's 'disabled' property to true
    // to disable all the control.
}


When to call this javascript method:
===========================================================
When page has completed rendering process then this method must be called.

So at the end of your aspx page call this function to disable all controls.

Reusability:
===========================================================
The very same function you can use to enable all the control if you pass some true or false as a parameter to the function so that the sae function can be used for enabling or disabling.

Hope this helps ... Big Grin | :-D




Thanks,
Arindam D Tewary

QuestionAdd Control Pin
vengaqua16-Mar-07 21:50
vengaqua16-Mar-07 21:50 
AnswerRe: Add Control Pin
Kunal P16-Mar-07 23:39
Kunal P16-Mar-07 23:39 
GeneralRe: Add Control Pin
vengaqua17-Mar-07 0:59
vengaqua17-Mar-07 0:59 
GeneralRe: Add Control Pin
Kunal P17-Mar-07 19:33
Kunal P17-Mar-07 19:33 
GeneralRe: Add Control Pin
vengaqua18-Mar-07 21:43
vengaqua18-Mar-07 21:43 
QuestionDisplay details in a table while sending mail Pin
anujose16-Mar-07 21:18
anujose16-Mar-07 21:18 
AnswerRe: Display details in a table while sending mail Pin
Ziyad Mohammad18-Mar-07 20:32
Ziyad Mohammad18-Mar-07 20:32 
QuestionIssues in Word Automation Pin
Sankara Narayana16-Mar-07 21:16
Sankara Narayana16-Mar-07 21:16 
AnswerRe: Issues in Word Automation Pin
Vasudevan Deepak Kumar19-Mar-07 5:38
Vasudevan Deepak Kumar19-Mar-07 5:38 
QuestionAccess OLE Object........ Pin
Are Jay16-Mar-07 11:41
Are Jay16-Mar-07 11:41 
QuestionRemember me is not working Pin
subhsam16-Mar-07 11:23
subhsam16-Mar-07 11:23 
QuestionWhere is the code hiding? Pin
Nostromo7716-Mar-07 11:19
Nostromo7716-Mar-07 11:19 
QuestionBind XMLdatasource to in Memory XPathDocument Pin
GaryWoodfine 16-Mar-07 8:10
professionalGaryWoodfine 16-Mar-07 8:10 
AnswerRe: Bind XMLdatasource to in Memory XPathDocument Pin
GaryWoodfine 19-Mar-07 13:52
professionalGaryWoodfine 19-Mar-07 13:52 
QuestionLearning asp.net Pin
chancomsats16-Mar-07 7:07
chancomsats16-Mar-07 7:07 
AnswerRe: Learning asp.net Pin
Jesse Squire16-Mar-07 7:23
Jesse Squire16-Mar-07 7:23 
AnswerRe: Learning asp.net Pin
Michael Sync16-Mar-07 21:29
Michael Sync16-Mar-07 21:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.