473,408 Members | 2,427 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,408 software developers and data experts.

2 Frame On Same Page

Hi ,
I've a doubt using 2 frames in same page .

PAGE 1 has 2 frames called F1 and F2.

F1 refers page P2
F2 refers page P3

In this P2 has a drop down list (bank ), when it's changed branch combo get loaded depend on bank code using BankCode_SelectedIndexChanged event.

both are server controls.

first time it's loaded correctly.. After that i'm submitting the page P2 (which is in frame F1)..
It retrives values and display it in P3 ( i mean in frame F2 )

Once again if i try to change bank code , it didn't fire BankCode_SelectedIndexChanged event . instead it fires page_load() function of page3 ( in frame F2)...

i dont know why it's calling page_load of Page P3 , instead of page_load of Page P2
.
If anyone knows , plz help me
Jul 25 '07 #1
5 1429
Frinavale
9,735 Expert Mod 8TB
Hi ,
I've a doubt using 2 frames in same page .

PAGE 1 has 2 frames called F1 and F2.

F1 refers page P2
F2 refers page P3

In this P2 has a drop down list (bank ), when it's changed branch combo get loaded depend on bank code using BankCode_SelectedIndexChanged event.

both are server controls.

first time it's loaded correctly.. After that i'm submitting the page P2 (which is in frame F1)..
It retrives values and display it in P3 ( i mean in frame F2 )

Once again if i try to change bank code , it didn't fire BankCode_SelectedIndexChanged event . instead it fires page_load() function of page3 ( in frame F2)...

i dont know why it's calling page_load of Page P3 , instead of page_load of Page P2
.
If anyone knows , plz help me

How are you reloading the values into P3 based on the values in P2?

I could be wrong here but..I think what's happening is your whole page is getting submitted when the DropDownList's index is changed. In order to re-display the page, P3's page_load must be called and your values are getting lost.

This seems overly complicated for what you are trying to do.
Jul 25 '07 #2
How are you reloading the values into P3 based on the values in P2?

I could be wrong here but..I think what's happening is your whole page is getting submitted when the DropDownList's index is changed. In order to re-display the page, P3's page_load must be called and your values are getting lost.

This seems overly complicated for what you are trying to do.
hi friend,
Page1.aspx has coding like this
Expand|Select|Wrap|Line Numbers
  1. <frameset>
  2. <FRAME name=frame2 src=page2.aspx>
  3. <FRAME name=frame3 src=page3.aspx>
  4. </frameset>
In frame 2(Actually frame1's SRC= page2.aspx) ,so in page 2 there is a bank combo (runat=server) ,
and one more combo called branch (runat=server) .
when bank combo changed , the branch combo must be reloaded to display branches based on bank code.
after that i click "OK" button , it calls a javascript which has the following code
Expand|Select|Wrap|Line Numbers
  1. document.form2.method="post";
  2. document.form2.target=" frame3";
  3. document.form2.submit();
  4.  
so It will display some details of bank's in frame3 ( Actually frame3's SRC= page3.aspx)

so page3 has datagrid to display the details.

when page1 is loaded page2 ( which is in frame2)
has bankcode combo (LOADED with values) and branch code combo (not loaded).
page3 is empty. ( which is in frame3)

when i select bank , it will load branch codes ( in this event page2's page_load() function and bankcombo_selectedIndexchange() events are fired and branches loaded successfully.).

Then i'll click "OK" button , which submit's the form2 (page2's form name ) and it's result targeted to frame2 as like above code. (This time page3's page_load() function called and datagrid loaded, based on parameter send from page2 )

so page3's datagrid loaded with neccessary info of bank and branch ..

Now, my problem is ....

Again if i select some other bank in bank combo, it doesn't call it's corresponding page_load ( must be page2's page_load() fuction called and bankcombo_SelectedIndexChanged(..) ), but it calls page3's page_load() function ..

But bank combo is in page2 only..

Why ?

Plz help me...
Jul 26 '07 #3
Frinavale
9,735 Expert Mod 8TB
Hi gokula309,

I'm sorry about the delayed reply.
I took some time to research your problem and discovered that any time that you need to call your server side code, the Whole page is refreshed. I also discovered that when a frameset page is refreshed, the original urls for each frame are loaded.

This means that your Page3.aspx will be re-loaded every time you submit your information to the server from any aspx page in your frameset. It doesn't matter whether the server side code was called from Page1.aspx, Page2.aspx, or Page3.aspx, all of them will be reloaded.

eg.
If you submit information from Page2.aspx, your Page1.aspx and Page3.aspx will be reloaded.

According to this article on Working with Frames in .NET, if you use SmartNavigation in your aspx pages, only the elements within the form will be submitted to the server.

I hope this helps you!

-Frinny
Jul 27 '07 #4
Hi Frinny,
Thanks for your timely help... I tried some other ways too.. Not able to solve it. My friend told that one option for that AJAX..
Aug 1 '07 #5
Frinavale
9,735 Expert Mod 8TB
Hi Frinny,
Thanks for your timely help... I tried some other ways too.. Not able to solve it. My friend told that one option for that AJAX..
Ajax could work...

I still think that the frames are over complicating your problem.
I recommend thinking about putting your pages into user controls and adding them to a single page.

Cheers!
-Frinny
Aug 1 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bart Plessers \(artabel\) | last post by:
Hello, I am wondering if one could do following. I have a main frame with 3 subframes ("top", "left" and "contents") I have a link in the left frame, someting like: <a...
3
by: Morten Thorsen | last post by:
Hi frame experts c",) Hope you can help me out on this one I've got a frameset (index.html) on my server (server A) defining two frames. Left frame is named "menu" and contains a page (menu.html)...
3
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
1
by: success_ny | last post by:
I cannot seem to find the answer to this rather simple question. Pardon me if it looks illogial or silly. Can I create a frame in the same page without referring to other html files? I.e., I...
5
by: Martin Chen | last post by:
I have a frame set (as per MS FrontPage 2000). It has a contents and a main frame. The contents frame has a menu bar written with with javascript (in the context of a table). In IE6.1 everything...
17
by: Bruno | last post by:
I have a feature that is hosted on a different domain from the primary one in a frame, and need to retain values in a cookie. example: A web page at one.com contains a frame which has a page...
42
by: smerf | last post by:
Using javascript, is there a way to trap an external page inside a frame? I've seen scripts to break out of frames, but nothing to keep a page trapped in a frame.
2
by: crferguson | last post by:
I'm having a really odd issue. Recently my company has upgraded our data server. For a couple of months I'm having to host two versions of the same website on our webserver until the new data...
4
by: Matt | last post by:
I am no JavaScript guru so please bear with me and be as detailed as possible with your response. I thank you in advance. I have an ASP page that contains form elements. I also have an inline...
6
by: Richard Maher | last post by:
Hi, Now that I am aware that JS on a page in Frame A can directly call a function on a page in Frame B, I no longer have to continue with my frameB.location.reload() fudge in order to get some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.