Making the controls in a page as readonly


In many cases we have found that when a form has been submitted and is being accessed by other users, if the page controls have been set as Enabled false, it is not always clearly visible as IE by default greys out the controls.

One solution to over come this issue is to make all the controls as ReadOnly, but one limitation, not all the controls in ASP.NET have the ReadOnly property. In order to overcome this the following code is very useful. Just call the method as "readOnlyInputs(Page.Controls)".


Comments

Popular posts from this blog

jQuery Basics

What is the difference between a Page Layout and Master Page in SharePoint?

Accessing data from SharePoint 2010 to an ASP.NET application