CodeVerge.Net Beta
Login Idy
Register Password
  Forgot?
Explore    Item Entry    Members   
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 7/12/2006 11:24:22 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 36 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
madscene
Asp.Net User
Trying to Use Adapter To Modify ValidationSummary to use Span instead of Div7/12/2006 11:24:22 PM

0/0

Not sure this is the right forum for this, but I am trying to write a WebControlAdapter to simply have a ValidationSummary control render a Span tag instead of a Div tag as it's outer-most tag.  Inside my adapter I have:

        protected override void RenderBeginTag(HtmlTextWriter writer)
        {
            writer.RenderBeginTag(HtmlTextWriterTag.Span);
        }

        protected override void RenderEndTag(HtmlTextWriter writer)
        {
            writer.RenderEndTag();
        }

The problem is, none of the rest of the control renders at all, and it stops working entirely.  I just get the <span></span>

Shouldn't the objects Render() be called if I don't override it?  What am I missing?  How can I do this?

P.S.  The root problem I am trying to solve is the problem that when using a validation summary control inside an update panel with an ajax form, the page scrolls to the top when there are validation errors.  Based on I believe we can correct this with the right tweaks to the output html/javascript?
RobinBX
Asp.Net User
Re: Trying to Use Adapter To Modify ValidationSummary to use Span instead of Div1/16/2008 4:42:43 PM

0/0

If you are overriding, you should call the base method before apply modification.

 something like :

protected override void RenderBeginTag(HtmlTextWriter writer)
        {

            base.RenderBeginTag();
            writer.RenderBeginTag(HtmlTextWriterTag.Span);
        }

 

hope this help.

2 Items, 1 Pages 1 |< << Go >> >|



Search This Site:


Meet Our Sponsors:



Other Resources:

Simple vertical menu - microsoft_downloads ... trying to use adapter to modify validationsummary to use span instead of div. need help using control adapters at the machine level. bg images to menu ...
xsl Question - microsoft.public.dotnet.languages.csharp - Web ... xsl Question, > ROOT > NEWSGROUPS > Microsoft News > microsoft.public.dotnet.languages.csharp, Date: 1/26/2008 6:08:48 ... Trying to Use Adapter To Modify ...
Simple vertical menu - microsoft_downloads ... trying to use adapter to modify validationsummary to use span instead of div. need help using control adapters at the machine level. bg images to menu ...
xsl Question - microsoft.public.dotnet.languages.csharp - Web ... xsl Question, > ROOT > NEWSGROUPS > Microsoft News > microsoft.public.dotnet.languages.csharp, Date: 1/26/2008 6:08:48 ... Trying to Use Adapter To Modify ...
TheMSsForum.com >> Asp >> URL link plus parameters - The Microsoft ... ... ffffff background=3D""> <DIV><FONT face=3DArial size=3D2>I'm trying to update a ... Right now i creating a ValidationSummary control, that makes use of my ...
TheMSsForum.com >> Asp >> china supply cheap lacoste trainers cheap GGG ... FormView Insert Session value Hi, I'm trying to use FormView to Insert an Object ... why I need to use the variable <%= jsTextAddress %> instead of comparing it ...
ASP.NET Development Use validationSummary to display error message in user control ... WebControl using SPAN tag instead of DIV tags. trying to change the culture in an IHttpModule ...


 
All Times Are GMT