Click here to Skip to main content
15,921,169 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: CSS Hover Pin
chaiguy133720-Jan-08 15:25
chaiguy133720-Jan-08 15:25 
GeneralRe: CSS Hover Pin
Trustapple20-Jan-08 16:36
Trustapple20-Jan-08 16:36 
GeneralUser management [modified] Pin
#realJSOP19-Jan-08 3:10
professional#realJSOP19-Jan-08 3:10 
Question[Message Deleted] Pin
pradeep kumarappagari19-Jan-08 3:02
pradeep kumarappagari19-Jan-08 3:02 
GeneralRe: Read image from Excel sheet? Pin
Paul Conrad20-Jan-08 9:28
professionalPaul Conrad20-Jan-08 9:28 
Generalasp:TextBox weirdness Pin
#realJSOP19-Jan-08 1:44
professional#realJSOP19-Jan-08 1:44 
GeneralRe: asp:TextBox weirdness Pin
Abhijit Jana19-Jan-08 1:49
professionalAbhijit Jana19-Jan-08 1:49 
GeneralRe: asp:TextBox weirdness Pin
#realJSOP19-Jan-08 2:13
professional#realJSOP19-Jan-08 2:13 
I found another solution as well:

Create this class:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace MyWebControls
{
    public class TextBox : System.Web.UI.WebControls.TextBox
    {
        public override bool ReadOnly
        {
            get
            {
                return false;
            }
            set
            {
                if (value)
                {
                    this.Attributes.Add("readonly", "readonly");
                }
                else
                {
                    this.Attributes.Remove("readonly");
                }
            }
        }
    }
}


Add the following to your web.config:

<system.web>
    <pages>
      <tagMapping>
        <add tagType="System.Web.UI.WebControls.TextBox" mappedTagType="MyWebControls.TextBox"/>
      </tagMapping>
    </pages>
</system.web>


But I'll give your thing a go because that is a lot lower effort.


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


GeneralRe: asp:TextBox weirdness Pin
Abhijit Jana19-Jan-08 2:23
professionalAbhijit Jana19-Jan-08 2:23 
GeneralRe: asp:TextBox weirdness Pin
Michael Sync21-Jan-08 4:58
Michael Sync21-Jan-08 4:58 
GeneralRe: asp:TextBox weirdness Pin
#realJSOP19-Jan-08 2:15
professional#realJSOP19-Jan-08 2:15 
GeneralRe: asp:TextBox weirdness Pin
Abhijit Jana19-Jan-08 2:21
professionalAbhijit Jana19-Jan-08 2:21 
GeneralRe: asp:TextBox weirdness Pin
#realJSOP19-Jan-08 3:01
professional#realJSOP19-Jan-08 3:01 
GeneralRe: asp:TextBox weirdness Pin
Vasudevan Deepak Kumar19-Jan-08 19:12
Vasudevan Deepak Kumar19-Jan-08 19:12 
QuestionHow can this be possible? - Part 3 Pin
v1i9n6o7d19-Jan-08 0:39
v1i9n6o7d19-Jan-08 0:39 
AnswerRe: How can this be possible? - Part 3 Pin
mohankatari21-Jan-08 0:25
mohankatari21-Jan-08 0:25 
GeneralRe: How can this be possible? - Part 3 Pin
v1i9n6o7d22-Jan-08 2:08
v1i9n6o7d22-Jan-08 2:08 
Generalpost back url Pin
sirisha guttikonda19-Jan-08 0:31
sirisha guttikonda19-Jan-08 0:31 
GeneralDuplicate Post -&gt; Please Ignore Pin
Abhijit Jana19-Jan-08 0:39
professionalAbhijit Jana19-Jan-08 0:39 
Generalpost back url Pin
sirisha guttikonda19-Jan-08 0:30
sirisha guttikonda19-Jan-08 0:30 
GeneralRe: post back url Pin
Abhijit Jana19-Jan-08 0:39
professionalAbhijit Jana19-Jan-08 0:39 
GeneralRe: post back url Pin
krishnaveer19-Jan-08 0:42
krishnaveer19-Jan-08 0:42 
GeneralRe: post back url Pin
sirisha guttikonda19-Jan-08 0:49
sirisha guttikonda19-Jan-08 0:49 
GeneralMenu control problem Pin
~V~19-Jan-08 0:10
~V~19-Jan-08 0:10 
QuestionHow to use Xquery in asp.net application Pin
VanithaVasu18-Jan-08 23:32
VanithaVasu18-Jan-08 23:32 

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.