controlling HTML frames via VB code

Posted on 2003-02-26
Medium Priority
Last Modified: 2008-03-06
Hi all...I am working on a frameset that has two frames set as rows="*,0" which means that the second frame is invisible to the user and is used to house an independant timer script.

I have set up a debug variable that I want to be able to check on the frameset aspx that determines if debug mode is set to true then change the rows="*,150" so I can see whats going on.  Else rows="*,0".

Problem is, I don't know how to access the frameset via VB codebehind for my frameset aspx file.  Any ideas?
Question by:Lehthanis
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

ID: 8032829
Remember the vb code behind is running on the server.  If your timer is running in a frameset on the client, you're going to have to script a call to the server side code in order to execute the vb.net code behind.

Hope this helps.

Author Comment

ID: 8033419
How would I go about that though?  All I've ever worked with is <asp:> tags in .net, so I don't know for sure how to access server side variables.

Accepted Solution

nycsmith2k earned 120 total points
ID: 8038962
OK, I read a little deeper into the question, how about this.

In your frameset.aspx you have the following:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="frameset.aspx.vb" Inherits="vbAdvancedFeatures.frameset"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <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">
  <frameset rows="*,<%# lngSize %>" border=0 frameSpacing=0 frameBorder=0>
     <frame name="banner" src="frBanner.htm" scrolling="no" noresize>
          <frame name="Debug" src="debug.aspx" scrolling="no" noresize>


***** then in your code behind you have the following

  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
        Dim boolDebug As Boolean
        'set your debug variable here.
        boolDebug = False
        If boolDebug Then
            lngSize = 150

            'rows =rows="*,0".
            lngSize = 0
        End If

    End Sub

***** this will allow you to control your frameset from the variable in the code-behind...
Hope this helps.

Author Comment

ID: 8080874
Thanx for the help!  this solved a lot of other problems I was having with passign information around...thank you!  I almost forgot about my classic asp roots in all the .net hub-bub.

Featured Post

How to Create Failover DNS Record Sets in Route 53

Route 53 has the ability to easily configure DNS record sets specifically for failover scenarios. These failover record sets can be configured to failover to full-blown deployments in other regions or to a static HTML page that informs your customers of the issue.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question