You're welcome Lee,
Thanks again for your posting.
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: How to Switch HtmlTextWriter via browserCaps in web.config
| thread-index: AcWn6rdx87ybMs6 vS2C2/8z1U7d9WQ==
| X-WBNR-Posting-Host: 194.200.242.250
| From: "=?Utf-8?B?TGVlIENoYXB tYW4=?=" <Le********@new sgroup.nospam>
| References: <62************ *************** *******@microso ft.com>
<j4************ **@TK2MSFTNGXA0 1.phx.gbl>
| Subject: RE: How to Switch HtmlTextWriter via browserCaps in web.config
| Date: Tue, 23 Aug 2005 06:58:19 -0700
| Lines: 112
| Message-ID: <2D************ *************** *******@microso ft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GXA02.phx.gbl!T K2MSFTNGXA03.ph x.gbl
| Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:1197 21
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
|
| Thanks - that did it.
|
| (Although I mistyped "neutral" as "netural" in my config file, which
stumped
| me for a bit... Doh.)
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Lee,
| >
| > Welcome to ASPNET newsgroup.
| > Regarding on problem when overriding the "tagWriter" fo the
<browserCaps>
| > setting, I think it's due to the tagWriter attribute is generally only
| > provided with a Type Name , no assembly info which cause the runtime
| > looking for the type in the System.Web.Dll. Based on my test, we can
use
| > the assembly Full Qualified name to specify the tagWriter in
<browserCaps>
| > like:
| >
| > <browserCaps>
| >
| >
tagWriter=WebTa gWriters.DummyW riter,WebTagWri ters,Version=1. 0.2057.23025,Cu l
| > ture=neutral,Pu blicKeyToken=2e e82f19289eada7
| > </browserCaps>
| >
| > the WebTagWriters.D ummyWriter type is in the WebTagWriters.d ll
assembly.
| > Also, should strong named the assembly and put it into the GAC.
| >
| > In addition, based on my research, the currently version of the ASP.NET
| > (1.x) haven't definite document on customzing the HtmlTextWriter, it is
| > recommend that we use the buildin ones (HtmlTextWriter or
| > Html32TextWrite r). At lease make sure not to modify the machine.config
for
| > such setting.
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure!
www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| >
| >
| >
| >
| >
| >
| > --------------------
| > | Thread-Topic: How to Switch HtmlTextWriter via browserCaps in
web.config
| > | thread-index: AcWj8dnR3tm5I45 ZT6ucpiHt2R90fw ==
| > | X-WBNR-Posting-Host: 194.200.242.250
| > | From: "=?Utf-8?B?TGVlIENoYXB tYW4=?=" <Le********@new sgroup.nospam>
| > | Subject: How to Switch HtmlTextWriter via browserCaps in web.config
| > | Date: Thu, 18 Aug 2005 05:39:18 -0700
| > | Lines: 29
| > | Message-ID: <62************ *************** *******@microso ft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| > | Path:
TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GXA02.phx.gbl!T K2MSFTNGXA03.ph x.gbl
| > | Xref: TK2MSFTNGXA01.p hx.gbl
| > microsoft.publi c.dotnet.framew ork.aspnet:1188 49
| > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > |
| > | Hi,
| > |
| > | I want my ASP.NET web application to use a custom HtmlTextWriter.
i.e. I
| > | want the object that the Framework passes to
| > System.Web.UI.C ontrol.Render()
| > | to be my own object, MyHtmlTextWrite r, which inherits from
| > | System.Web.UI.H tmlTextWriter.
| > |
| > | I have tried to do this by changing my application's web.config file:
| > I've
| > | added the following to the /configuration/system.web section.
| > |
| > | <browserCaps>
| > | tagwriter=MyNam espace.MyHtmlTe xtWriter
| > | </browserCaps>
| > |
| > | But I now get the following server error.
| > |
| > | [ConfigurationEx ception: The HttpBrowserCapa bilities string
'tagwriter'
| > | evaluated to 'MyNamespace.My HtmlTextWriter' . Could not load type
| > | MyNamespace.MyH tmlTextWriter from assembly System.Web,
| > Version=1.0.500 0.0,
| > | Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a. Check the
browserCaps
| > | section of machine.config or web.config to correct the error.]
| > |
| > | How can I tell the Framework which assembly it needs to look in to
find
| > | MyHtmlTextWrite r? And does this assembly have to be in the GAC? - I'd
| > rather
| > | it wasn't.
| > |
| > | Thanks,
| > | - Lee
| > |
| > |
| >
| >
|