Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How do I send an aspx file to a particular frame location

How do I send an aspx file to a particular frame location

Scheduled Pinned Locked Moved ASP.NET
questioncsharphelpjavascripthtml
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vernware
    wrote on last edited by
    #1

    I am developing an application in asp.net and using C# for any code requirements. I am bringing an old ASP project over to asp.net. The old asp project used JavaScript for much of the coding. I am trying to perform a javascript function in the C# world. Here is the old JavaScript function: function LoadMenuBar() { window.parent.parent.DisplayMenuBar.location = "menu_bar.asp"; return; } This function would send the menu_bar.asp file to a frame segment named DisplayMenuBar. Here is the HTML code that defines DisplayMenuBar: My question is, how do I perform this same functionality in asp.net using C# as the code environment? Would be very greatful for any suggestions/help/etc on this issue. Vern

    A 1 Reply Last reply
    0
    • V Vernware

      I am developing an application in asp.net and using C# for any code requirements. I am bringing an old ASP project over to asp.net. The old asp project used JavaScript for much of the coding. I am trying to perform a javascript function in the C# world. Here is the old JavaScript function: function LoadMenuBar() { window.parent.parent.DisplayMenuBar.location = "menu_bar.asp"; return; } This function would send the menu_bar.asp file to a frame segment named DisplayMenuBar. Here is the HTML code that defines DisplayMenuBar: My question is, how do I perform this same functionality in asp.net using C# as the code environment? Would be very greatful for any suggestions/help/etc on this issue. Vern

      A Offline
      A Offline
      Arindam Tewary
      wrote on last edited by
      #2

      See displaying file is always an event that is easy to achieve in Client side. Do go for C# code for the sake of doing everything in C#. C# is a server side language it is not a client side language. So please use the same javascript to display( i.e. load) the aspx page.

      Thanks, Arindam D Tewary

      V 2 Replies Last reply
      0
      • A Arindam Tewary

        See displaying file is always an event that is easy to achieve in Client side. Do go for C# code for the sake of doing everything in C#. C# is a server side language it is not a client side language. So please use the same javascript to display( i.e. load) the aspx page.

        Thanks, Arindam D Tewary

        V Offline
        V Offline
        Vernware
        wrote on last edited by
        #3

        Thanks for the reply. Sometimes the easy answer is so easy you cannot see it. I will take your advise. Thanks again, Vern

        1 Reply Last reply
        0
        • A Arindam Tewary

          See displaying file is always an event that is easy to achieve in Client side. Do go for C# code for the sake of doing everything in C#. C# is a server side language it is not a client side language. So please use the same javascript to display( i.e. load) the aspx page.

          Thanks, Arindam D Tewary

          V Offline
          V Offline
          Vernware
          wrote on last edited by
          #4

          I am trying to execute a client side JavaScript function to send a page to a particular frame location. This is how I am doing it: On the page being loaded, I have the following form definition:

          I need the LoadMenuBar function to execute (on the client). So I removed the runat=”server” property form the form element. Everything seems to run OK, except the LoadMenuBar function does not execute when the form is loaded. This is the LoadMenuBar function: function LoadMenuBar() { alert("Got Here"); window.parent.parent.DisplayMenuBar.location = "menu_bar.aspx"; return; } This script code is inserted in the page that gets loaded. I guess my question is, why is the LoadMenuBar function not being executed? Thanks, Vern

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups