473,387 Members | 1,549 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,387 software developers and data experts.

How do I access frameproperties in vb.net?

Hello!
In my mainpage i have two frames (MENU and MAIN). In the MAIN I load another
page with frames (Sub_Frame.htm). It contains TOP and BOTTOM frame. In
BOTTOM frame I have a page with a button (Result.aspx). What I want to do is
from that button, change the SRC in a frameset two levels up (SRC for MAIN
frame in Main_Frame.aspx should be changed from Sub_Frame.aspx to
http://www.gotdotnet.com). How do I achieve this?

Best regards
/ Bengt-Erik

Main_Frame.htm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>Contents Frameset</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</head>
<frameset cols="150,*">
<frame name="menu" src="Menu.aspx">
<frame name="main" src="Sub_Frame.htm">
<noframes>
<p id="p1">
This HTML frameset displays multiple Web pages. To view this frameset,
use a
Web browser that supports HTML 4.0 and later.
</p>
</noframes>
</frameset>
</html>

Sub_Frame.htm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>Horizontal Split Frameset</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</head>
<frameset rows="*,*">
<frame name="top" src="Search.aspx">
<frame name="bottom" src="Result.aspx">
<noframes>
<p id="p1">
This HTML frameset displays multiple Web pages. To view this frameset,
use a
Web browser that supports HTML 4.0 and later.
</p>
</noframes>
</frameset>
</html>

Result.aspx:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Result.aspx.vb"
Inherits="localhost.Result"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Result</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<P>
<asp:TextBox id="txtUrlToOpen"
runat="server">http://www.gotdotnet.com/</asp:TextBox></P>
<P>
<asp:Button id="btnOpenUrl" runat="server" Text="Open URL in main
window"></asp:Button></P>
</form>
</body>
</HTML>

Result.aspx.vb:
Public Class Result
Inherits System.Web.UI.Page
Protected WithEvents txtUrlToOpen As System.Web.UI.WebControls.TextBox
Protected WithEvents btnOpenUrl As System.Web.UI.WebControls.Button
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Private Sub btnOpenUrl_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnOpenUrl.Click
'Here is the thing I wan't to achieve...
'Parent.Parent.Frames("main").Src = txtUrlToOpen.Text
End Sub
End Class
Nov 18 '05 #1
1 1664
The solution is to use client side JavaScript.
--
Peter O'Reilly
Nov 18 '05 #2

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

Similar topics

63
by: Jerome | last post by:
Hi, I'm a bit confused ... when would I rather write an database application using MS Access and Visual Basic and when (and why) would I rather write it using Visual Studio .Net? Is it as easy...
13
by: bill | last post by:
I am trying to convince a client that dotNet is preferable to an Access project (ADP/ADE). This client currently has a large, pure Access MDB solution with 30+ users, which needs to be upgraded....
1
by: Dave | last post by:
Hello NG, Regarding access-declarations and member using-declarations as used to change the access level of an inherited base member... Two things need to be considered when determining an...
13
by: Simon Bailey | last post by:
I am a newcomer to databases and am not sure which DBMS to use. I have a very simplified knowledge of databases overall. I would very much appreciate a (simplifed) message explaining the advantages...
0
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
47
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
64
by: John | last post by:
Hi What future does access have after the release of vs 2005/sql 2005? MS doesn't seem to have done anything major with access lately and presumably hoping that everyone migrates to vs/sql. ...
92
by: Jeffrey P via AccessMonster.com | last post by:
Our IT guys are on a vendetta against MS Access (and Lotus Notes but they've won that fight). What I can't understand is, what's the problem? Why does IT hate MS Access so much. I have tried...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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...

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.