referencing frames in ASP.NET

Hi,
  I have a main HTML page that has a frameset. Two frames are inside this and they references top.aspx and botton.aspx. The ids of the frames are top and bottom respectively.The top.aspx has a textbox that user enters a name into. I want the value to appear in the bottom.aspx.  (The id of the form in the bottom.aspx is 'formbottom'.)

I am currently doing the following in a textonchange sub in the top.aspx but getting the error:
BC30203: Identifier expected.

 parent."bottom".formbottom.textName.text=Tb1.text.ToString()

ANy clues?

thanx

LuckyLucksAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hismightinessCommented:
You're going to have to accomplish this with JavaScript, not .Net.  The only way to do this with .Net is by not using frames, but User Controls.  You can do this quite easily this way by having the respective page classes contain Public Shared Properties to assign your values.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LuckyLucksAuthor Commented:
But then can a javascript reference aspx page objects. For instance,how will it reference a textbox in a form-parent.document.formname.textbox.text?

0
hismightinessCommented:
JavaScript can reference .Net objects just fine.  The only ones that are difficult to reference are those which are embedded in other objects, like DataGrids or Repeaters.  Normally, all you have to do is use the same name you assign to its ID property (this may vary with UserControls too, but you need to try it to find out).  However, this can require you to name your form.  
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

LuckyLucksAuthor Commented:
OK, I created a shared class with get and set properties to access the shared text variable. Will this be a .vb file or an .aspx file. And how would I include or access this file from the aspx page that needs to retreive this shared variable.(i.e syntax of the import or something).
0
hismightinessCommented:
You don't need to create a new class unless you really want to.  

If y ou are wanting to go the UserControl route, then just copy and paste the HTML content from each framed page into its own UserControl (*.ascx file).  Then you can drag and drop it onto the main page, or programmatically add it when needed.  Now, within each UserControl that has an object you wish to make changes to from another UserControl, you want to make that control Public instead of Protected.  This should allow you to reference it just like any other control, but you may have to prefix the controls name with the name of the UserControl class.

Example:
UserControl1.DropDownList1.SelectedIndex = 1
0
LuckyLucksAuthor Commented:
I am using asp controls. How would I make them public or protected?
0
hismightinessCommented:
In your CodeBehind, you will see them declared near the top of the page.  The line will say something like:

Protected WithEvents myControl As System.Web.UI.WebControls.MyControl

Change it to:

Public WithEvents myControl As System.Web.UI.WebControls.MyControl
0
LuckyLucksAuthor Commented:
I am not using code behind but rather inline. Is there a way I can accomplish that w/o rewriting everything in a code behind? And if not, I would sincerely appreciate the classes to import that go at the top of the code behind page. Also a example link if you already know of a good one would help but this I can hunt for myself too.

Thanx
0
hismightinessCommented:
I don't know a whole lot about inline coding.  Do you at any point have to Dim your WebControls in inline coding?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.