Hi,
Thanks very much for your response and the detailed description, I think
I've got the your problem from the your last reply.
In your email, you used the following hyperlink
<a href='http://servername/appName/pageProduct.aspx?id=123' target='right'>
to open the pageProcduct page in the "right" frame, also in the pageProduct
you use the
if (top.location == self.location) {top.location.href="Default.aspx";}
javascript to make sure the top frame is the default page, yes?
The problems is that when the user first time click the link, there is no
existing opened IE window, of course , there is no "right" frame, so it
can't find the "right" frame and then open a new browser window and locate
the pageProduct.aspx page in it. Then because of the if (top.location ==
self.location) {top.location.href="Default.aspx";} code, the browser will
replace the page in it with the default.aspx , that's why you see the
default page and the right frame is the "wecome page" by default.
And when you click the hyperlink again, since there is an existing opened
browser with default page in it and it can find a "right" frame in it, this
time the pageProduct.aspx page will be successfully located in the right
frame of the existing default page. Do you understand this?
As for how to resolve this, I think we have to put some code logic to set
the sub frame's location in the default.aspx page. We can provide a
querystring parameter for the default.aspx page to spcecify which url will
be loaded in the right frame , then in the default page we specify the src
of the left frame according to the querystring's value
for example, we request the default page as following
http://servername/appname/default.as...geProduct.aspx
in the default page, we change the template as below
<frameset rows="105px,*"><frame name="top_" src="topPage.aspx" ><frameset
cols="155,*" ><frame name="left_" src="leftPage.aspx" ><frame name="right_"
src="<%= contentUrl %>" ></frameset></frameset>
contentUrl is a page member and we can set it in the Page_Load
Page_Load......
{
this.contentUrl = "welcome.html";
string url = Request.QueryString["url"];
if(url != null)
{
this.contentUrl = url;
}
}
Thus, we can dynamically change the right frame's page via providing a
querystring and we can change the script
in pageProduct.aspx as below:
if (top.location == self.location)
{
top.location.href="Default.aspx?url=" + self.location;
}
How do you think of this? In fact, you can have a look at MSDN library's
page's url , such as
http://msdn.microsoft.com/library/de...us/vsdebug/htm
l/vxgrfaspnetdebuggingsystemrequirements.asp
You can find the msdn library's article page will be always located in a
sub frame in the default.asp and there is a
"url" querystring used to speicfy the main frame's location.
Above is some of my suggestions. Hope helps. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx