473,657 Members | 2,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirect in an Iframe

Jac

Aspx-problem :
I want to write code (C-sharp) behind a button, that determines on some criteria which webpage an IFRAME has to show.

To change a normal webpage you do a redirect in c-scharp (response.redir ect "page1.aspx ).
But in a webpage I have an IFRAME and I want only to change the contents of that IFRAME.

In a previous question Cliff proposed the following
on the static part:
<a href="newIframe page.aspx?par1= something" target="myIFram e">Click me to
change the Iframe</a>

then on the varialbe part:
<iframe name="myIFrame" (other attributes I'm sure go here) >
That was good, but I want to do it from my c-sharp code (because I need to do some test)
Thanks,
JAc
Nov 16 '05 #1
1 4195
Hi,
You can change it from an aspx tag. like below:
<IFRAME src="<%= myURL %>" .....
You have to declare the public myURL variable within your cs code.
And change it on your button click event.

Another solution could be with RegisterClientS criptBlock,
where you have to send client-side javascript to navigate your IFRAME.

Good Luck
Adnan

"Jac" <Ja*@discussion s.microsoft.com > wrote in message
news:7F******** *************** ***********@mic rosoft.com...

Aspx-problem :
I want to write code (C-sharp) behind a button, that determines on some criteria which webpage an IFRAME has to show.
To change a normal webpage you do a redirect in c-scharp (response.redir ect "page1.aspx ). But in a webpage I have an IFRAME and I want only to change the contents of that IFRAME.
In a previous question Cliff proposed the following
on the static part:
<a href="newIframe page.aspx?par1= something" target="myIFram e">Click me to
change the Iframe</a>

then on the varialbe part:
<iframe name="myIFrame" (other attributes I'm sure go here) >
That was good, but I want to do it from my c-sharp code (because I need to do some test) Thanks,
JAc

Nov 16 '05 #2

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

Similar topics

1
14145
by: Paul Oakfleet | last post by:
The script below will disable Submit button until user accept terms, and will redirect user to another page after clicking on Submit button. The script seems to work fine on my PC (Windows XP, IE6), however I don't know if it's written well. I would like the opinion of someone who knows how to write these codes properly. Please let me know if there're any logic errors. PS: Please keep in mind that I didn't write this script, I found it
6
4197
by: sentinel | last post by:
I am using this code to redirect to another page <body> <script language="javascript"> window.location="index2.php?ui=0&ua=0&opt=forum" </script> </body>
2
2784
by: dh | last post by:
How can a button that resides on the Main page tell the child Iframes to redirect without the page posting back? I keep getting a javascript error: "frames.iframe1 is null or not an object." I'm assuming this is because when i press the button it reloads the page and the frames can't be referenced. here's a simple example: <HTML> <script language="C#" runat="server">
2
12827
by: MLibby | last post by:
How can an IFrame's aspx page force a server-side redirect on its parent page? Typically, an IFrame's client-side javascript specifies '_top' to change the parent page... window.open('default.aspx?SMID=18', '_top', '', false); However, the server-side Redirect doesn't include '_top'. I tried to write the following from server-side code hoping it would execute immediatly at the client but it won't fire, I'm not sure why:
2
7377
by: Sheryl Landon | last post by:
Hi, I'm having a similar issue as the poster Mike whose message I copied below... I have a page with an iframe... when I discover that the session state is no longer valid in the page inside the iframe, I want to redirect the parent page to a login page. Can anyone help me? Thanks, Sheryl "MLibby" <mlibby@nospam.nospam> wrote in message
4
4710
by: steph_mw | last post by:
I have an ASP page that has an aspx page within an iFram on this asp page. Once the user has filled in the form (within the aspx page) I need to redirect the user back to the orginating page (an asp page) within the iframe. Can anyone help me with this. TIA
0
3245
by: Ben Fidge | last post by:
Hi I've got a situation where I need to direct a Response.Redirect to a new window from within a page embedded within an IFrame. Currently, we have a page embedded within an IFrame that presents a list of items to the user in a drop-down list. According the the item selected, one of two things can happen when they click on a button next to the drop-down: a) The user is redirected to another page, which is itself displayed inside
1
4017
by: saber850 | last post by:
Hi, I have an IFrame in a page. Yada, yada, yada, the IFrame's page is changed via: document.getElementByID('frameName').src = "NewPage.php"; (I need to go this route because the frames... method doesn't work well if the IFrame is dynamically generated). So the IFrame's page is changed successfully to NewPage.php (or any other page I specify). Now I need NewPage.php to redirect to another
1
3160
by: jaimebienlesfruits | last post by:
Hi, I'm moving my old website to my new domain name and I need help redirecting. The thing is this, my old website (with a very long long long URL) was given a domain name by my host, but the domain name is simply an iframe. I just bought my very own domain (!!!) and I want to redirect the old domain, including the iframe. How do I go about this? Other than asking my host (who owns the old domain) to direct the iframe, is there a way with...
0
8385
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8821
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

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.