Atlas not working properly after my control is added

F

Francisco Padron

I have a Web Control that is affecting the correct functioning of Atlas and I
don't know why. I put together a very small sample control along with a test
application that reproduces the problem.

Basically, the control is prettye simple, what seems to be causing the
problem is some code I have in the OnPreRender method:

protected override void OnPreRender (EventArgs e)

{

base.OnPreRender(e);

string styleSheetUrl =
Page.ClientScript.GetWebResourceUrl(typeof(AtlasTestControl),"Stylesheet1.css");

LiteralControl styleSheetLink = new LiteralControl(string.Format("<link
rel=\"stylesheet\" href=\"{0}\" type=\"text/css\"/>",styleSheetUrl));


Page.Header.Controls.Add(styleSheetLink); // *****THIS LINE CAUSES THE
PROBLEM *****

}

I have a StyleSheet that I store in my resources. My control works fine the
StyleSheet is donwloaded and applied to the control (I use a style in the
style sheet in the HTML output I generate on RenderContents) but the fact
that the CSS is comming from the resources has a negative effect on Atla's
Calendar control used inside an UpdatePannel. If I include the same
stylesheet from a physical path as opposed to an embedded resource the error
does not occur.

The problem happens in my test page where I have an <input type="image">
control that pop's up the panel containing the calendar control. The click
doesn't nothing but change the browsers caption, by commenting the line in
question, you get the correct behavior, a calendar control pops up.

Any ideas ? I can send you a a test control and sample that reproduces the
problem.

Frank
 

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,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top