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

repost w/ corrected MSDN name, simple frame to frame aspx communic

I have 2 frames - one with button and another with a grid
How do I get a reference to the controls on the other webform ?

From the one frame I can 'see the webform' fo the other frame, bit not the controls.
A simple code snippet would help. MSDN subscriber - but I dont think its linking correctly.

Thanks --
Andrew
Nov 16 '05 #1
2 1350
Hi Andrew,

From your description, you have two frame pages and want to reference the
controls on one page from another page, yes?

As for the problem, here are some of my suggestions:

1. The ASP.NET web page is using the Webform mode which contains many
ASP.NET Servercontrols. However, the webform and all its containing
servercontrols are only avaliable at the serverside( when the web page's
request is processing). So we can't access the serverside control
collection of one page from another page.

2. However, the ASP.NET web page will be rendered out as a html page to
client and the asp.net server controls are rendered as html elements. For
example, the ASP.NET TextBox control is rendered as <input type="text"...>
Label control is rendered as <span>....</span>....
But their "Id" attributre will still remain the same with their server
control's id so that when post back they could still restore the mapping.

Then, since the #1 and #2 I mentioned, the only means we can access the
controls on one page from another( frame based pages) is to use clientside
script and get the html element(rather than server control) via its "id".

For example, if we have two frames called
frmLeft and frmRight

in frmLeft ,there is a button and in frmRight there is a TextBox (actually
is <input type="text" ...>) and id is "txtRight",

Then, in frmLeft, we can use the following script code to get the reference
to the "txtMain"

window.parent.frames["frmRight"].document.getElementById("txtMain");

In addition, here are some former threads in the group discussing on the
similiar problem:

http://groups.google.com/groups?hl=e...1FxbzDHA.2900%
40cpmsftngxa07.phx.gbl&rnum=3&prev=/groups%3Fq%3Dframes%2Bsteven%2Bcheng%26i
e%3DUTF-8%26hl%3Den

http://groups.google.com/groups?hl=e...ExTTyDHA.2604%
40cpmsftngxa07.phx.gbl&rnum=4&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26
q%3Dframe%2Bpage%2Bsteven%2Bcheng

Hope also 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



Nov 16 '05 #2
Hi Andrew,

Have you had a chance to check out the suggestions in my last reply or have
you got any further ideas on this issue? If you have anything unclear or if
there're anything else we can help, please feel free to post here. 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

Nov 16 '05 #3

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

Similar topics

2
by: Ohaya | last post by:
Hi, We've been having a problem with one particular page that has a button on it, and a "tall" image (top-to-bottom). The button calls some simple Javascript to print the frame in which the...
3
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... ...
1
by: Jimi | last post by:
(Sorry for the repost, but I thought maybe I'd have better luck this time) I'm working on a utility to provide an overview of one's .NET projects and one of the things I want to display is...
2
by: Andrew | last post by:
I am trying to set the column information - which ones I want displayed and how with the web grid control. The interface has some big differences when compared to the winform. Is this possible...
5
by: AC | last post by:
Trying to get anchor names to work - a simple html concept - why so difficult? original post: > Ok, I know in html to jump to different parts of the same > page you simply use anchor name...
5
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me...
67
by: Scott M. | last post by:
Can anyone give me any ideas on why VS.NET 2003 running on XP Pro. (P4's with 1GB RAM) would take over 3 minutes to simply create a new ASP.NET Web Application on http://localhost? It seems that...
4
by: Dave Burns | last post by:
Hello, I am trying to specify a logical default value for a in a WCF Web Service using basicHttpBinding. I realize that the language defaults are: int - 0 string - null bool - false
20
by: cowboyrocks2009 | last post by:
Hi, I need help to automate my code to take data from input file. Also I need to create it as a function so that I can pass it to some other program. I am new to Java so having a bit limitation to...
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: 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: 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
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.