Link to home
Start Free TrialLog in
Avatar of clickclickbang
clickclickbang

asked on

Custom Control Render (HtmlTextWriter writer) Not Writing ID Attribute

I am using the following code. It creates the opening and closing div tag but does not include the attribute tag. Any ideas what I am doing wrong?

        protected override void Render(HtmlTextWriter writer)
        {          
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            writer.AddAttribute(HtmlTextWriterAttribute.Id, "hi");
            writer.RenderEndTag();

            base.Render(writer);
        }

Thanks for help!
ASKER CERTIFIED SOLUTION
Avatar of clickclickbang
clickclickbang

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You'll have to add a question in Community Support and link to this question.. the Admins won't find it without your help...
https://www.experts-exchange.com/Community_Support/

Glad you found a solution... Take care.
-- Jason