A PopEndTag was called without a corresponding PushEndTag

T

TJS

can any one help with this error message ? What's missing ?

"A PopEndTag was called without a corresponding PushEndTag"

==============offending code to generate droplist ====================
......

writer.AddAttribute(HtmlTextWriterAttribute.Id, name)
writer.AddAttribute(HtmlTextWriterAttribute.Name, name)
writer.RenderBeginTag(HtmlTextWriterTag.Select)

while dtr.read

writer.AddAttribute( HtmlTextWriterAttribute.Value, dtr(0) )
If colEditValues(name) = dtr(0) Then
writer.AddAttribute(HtmlTextWriterAttribute.Selected, "SELECTED")
End If

writer.RenderBeginTag(HtmlTextWriterTag.Option)
writer.Write(dtr(1))
writer.RenderEndTag()

end while

writer.RenderEndTag()


........
 
K

Kevin Spencer

can any one help with this error message ? What's missing ?

As far as I can tell, what's missing is the offending code. The code you
posted by itself is fine. Other than the fact that you're not using Option
Strict. So, I can't tell what exactly is going into your HTML.

You call RenderBeginTag for the Select object. Then you create each option,
calling RenderBeginTag and RenderEndTag with each one. Finally, you call
RenderEndTag on the Select object. In this block, all the PopEndTags have
PopPushTags.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top