bug in ASP.NET 2.0?!

S

Sergei Shelukhin

I wrote ascx control that resides in A namespace.
I had several controls from that namespace written as simple C# classes
(without ascx part) and they worked ok with
<%@ Register TagPrefix="tc" NameSpace="A" Assembly="A" %>

However, ascx control refused to render - it just rendered to empty
string.
The interesting thing is that there were no errors, compile time or
runtime, no warnings, and control methods did get called (I tried
overriding render and placing a brekapoint there - it got hit), if I
tried to render control into string in Page_Load it returned an empty
string.

The fix was as simple as adding the following declaration to the page:
<%@ Register TagPrefix="tc1" TagName="MyControl"
Src="~/Component/MyControl.ascx" %>
and changing the control tag prefix accordingly.
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top