473,394 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

ASP.NET and Frames

Ben
Hello

First, I know frames are not exactly the best things to be using in an asp
application, but I had no other choice. My problem is that I now have
situations where one frame must update another. Is there a way to do this?

I have tried the following code:
string script = "javascript:parent.menu.location.reload(true); ";
this.Page.RegisterStartupScript("reload", script);

but this does not work. Any suggestions?
May 15 '06 #1
5 2082
"Ben" <ben_1_ AT hotmail DOT com> wrote in message
news:C2**********************************@microsof t.com...
but this does not work.


How do you know it doesn't work...?
May 15 '06 #2

"Ben" <ben_1_ AT hotmail DOT com> wrote in message
news:C2**********************************@microsof t.com...
Hello

First, I know frames are not exactly the best things to be using in an asp
application
Why is this?

, but I had no other choice. My problem is that I now have situations where one frame must update another. Is there a way to do
this?
of course, you have to use jscript and reload the other frame.
I have tried the following code:
string script = "javascript:parent.menu.location.reload(true); ";
this.Page.RegisterStartupScript("reload", script);

but this does not work. Any suggestions?


what error r u getting?

I would change it to

string script = "<script>parent.menu.location.reload(true) </script>"

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
May 15 '06 #3
Ben
I have a method that those lines of code are called from.

The code seems to run without throwing any errors, but the frame is not
updated.

Here is the exact code:
private void refreshMenu()
{
string script = "<script>parent.menu.location.reload(true)</script>";
this.Page.RegisterStartupScript("reload", script);
}

Thank you again for any additional help.
Ben

"Ignacio Machin ( .NET/ C# MVP )" wrote:

"Ben" <ben_1_ AT hotmail DOT com> wrote in message
news:C2**********************************@microsof t.com...
Hello

First, I know frames are not exactly the best things to be using in an asp
application


Why is this?

, but I had no other choice. My problem is that I now have
situations where one frame must update another. Is there a way to do
this?


of course, you have to use jscript and reload the other frame.
I have tried the following code:
string script = "javascript:parent.menu.location.reload(true); ";
this.Page.RegisterStartupScript("reload", script);

but this does not work. Any suggestions?


what error r u getting?

I would change it to

string script = "<script>parent.menu.location.reload(true) </script>"

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

May 15 '06 #4
Ben,
Try something more like this:

string script =
"<script>window.parent.frames['menu'].location.reload(true);</script>";

--Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ben" wrote:
Hello

First, I know frames are not exactly the best things to be using in an asp
application, but I had no other choice. My problem is that I now have
situations where one frame must update another. Is there a way to do this?

I have tried the following code:
string script = "javascript:parent.menu.location.reload(true); ";
this.Page.RegisterStartupScript("reload", script);

but this does not work. Any suggestions?

May 15 '06 #5
Hi,

You will not get any exception, the browser does not throw exceptions.

do something like:

in the aspx page:
<script<
function RefreshFrame()
{
alert(parent);
alert( parent.menu);
alert( parent.menu.location);
parent.menu.location.reload(true);
}
</script>
<body runat=server id=theBody>

in the .cs:
protected HtmlGenericControl theBody;

theBody.Attributes.Add( "onLoad", "RefreshFrame();");
"Ben" <ben_1_ AT hotmail DOT com> wrote in message
news:73**********************************@microsof t.com...
I have a method that those lines of code are called from.

The code seems to run without throwing any errors, but the frame is not
updated.

Here is the exact code:
private void refreshMenu()
{
string script = "<script>parent.menu.location.reload(true)</script>";
this.Page.RegisterStartupScript("reload", script);
}

Thank you again for any additional help.
Ben

"Ignacio Machin ( .NET/ C# MVP )" wrote:

"Ben" <ben_1_ AT hotmail DOT com> wrote in message
news:C2**********************************@microsof t.com...
> Hello
>
> First, I know frames are not exactly the best things to be using in an
> asp
> application


Why is this?

, but I had no other choice. My problem is that I now have
> situations where one frame must update another. Is there a way to do
> this?


of course, you have to use jscript and reload the other frame.
> I have tried the following code:
> string script = "javascript:parent.menu.location.reload(true); ";
> this.Page.RegisterStartupScript("reload", script);
>
> but this does not work. Any suggestions?


what error r u getting?

I would change it to

string script = "<script>parent.menu.location.reload(true) </script>"

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

May 15 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: JohnnyCJohnny | last post by:
Is it pretty safe to say that almost all web surfers now use browsers that are Frames compatible? What are most people using these days? IE? Thanks
7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
25
by: Steal | last post by:
Hi at all I try to validate this page using the link: http://validator.w3.org/ but it return that this is not a valid HTML 4.01 page please where is it error? Steil <!DOCTYPE HTML PUBLIC...
7
by: dj Bass | last post by:
simple, they don't like things that restrict the server-side controls... and when it comes to frames, you need client side stuff and that stuff's up the asp.net strategy. right or wrong?
56
by: Deepan HTML | last post by:
Hi All, Currently i am working in a framed environment where i have divided the window as 20% and 80% and the 20% is used for navigation purpose and right frame for displaying the orignal content....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.