I have a problem:
I have a 100% dynamic site, which means that I just have one updatepanel on the startpage. All content is added dynamically to default.aspx via code behind, different pages are web user controls.
The problem arises when I want to open 2 windows (drag-able panels via ajax control toolkit).
I want to position these panels via javascript but the positioning javascript does not run.
Note that I'm still on the first page of the web-site, there is no back history in the browser; when I "View source" in the webbrowser I see the code for the login page, which is what comes up first when the website opens.
I don't want any postbacks causing page-history, how can I execute javascript to position my windows?
Solved it
Well I solved this issue by moving the positioning to the server side, I created a "Window Manager" which keeps track of all open windows in the site. I then just put the position by adding the position to the Style attribute in my web user control like so:
protected void Page_Init(object sender, EventArgs e)
{
PartPanel.Attributes.Add("Style", Position);
}
public string Position
{
get
{
return "position:absolute;left:" + PosX "px;top:" + PosY + "px;";
}
}