473,804 Members | 3,672 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Want to be able to pass parameters to an IFRAME

Rod
I've got 2 ASP.NET WebPages that I've written in VB.NET 2003. One of them
has several controls on it, including at the bottom of the page an IFrame.
The second ASP.NET page is supposed to have parameters passed to it in the
query string. My problem is that I cannot figure out how to
programmaticall y change the parameters that are passed to the second ASP.NET
page, from the first ASP.NET page.

How is this done?

Rod
Nov 18 '05 #1
4 8975
in aspx:

<iframe id="footer" runat=server >

in code behind

footer.Attribut es["src"] = "page2.aspx?p1= " + HttpUtility.Url Encode(p1);
-- bruce (sqlwork.com)
"Rod" <ro**@newsgroup s.nospam> wrote in message
news:uJ******** ******@tk2msftn gp13.phx.gbl...
I've got 2 ASP.NET WebPages that I've written in VB.NET 2003. One of them
has several controls on it, including at the bottom of the page an IFrame.
The second ASP.NET page is supposed to have parameters passed to it in the
query string. My problem is that I cannot figure out how to
programmaticall y change the parameters that are passed to the second ASP.NET page, from the first ASP.NET page.

How is this done?

Rod

Nov 18 '05 #2
Hi Rod,

As for the dynamically setting querystring items passed to the inner iframe
page, I think bruce 's suggestion is qutie good. First declare the <iframe
runat="server" id="frm"> element as a HtmlGenericCont rol, such as
protected System.Web.UI.H tmlControls.Htm lGenericControl frm;

so t hat we can reference it in code behind and then change the "src"
atrribute as we like. In addition, if you want to make it in the aspx page
inline, you can also define a function to dynamically generate the
querysting items , for example:

<iframe id="frm" src="innerpage. aspx?<% BuildQueryStrin g()%>">
"BuildQueryStri ng" can be a public helper function in the page class that
generate the querystring list.
Hope also helps.Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Nov 18 '05 #3
Rod
Thank you, Bruce, that did the trick.

Rod

"bruce barker" <no***********@ safeco.com> wrote in message
news:uO******** ******@TK2MSFTN GP11.phx.gbl...
in aspx:

<iframe id="footer" runat=server >

in code behind

footer.Attribut es["src"] = "page2.aspx?p1= " + HttpUtility.Url Encode(p1);

-- bruce (sqlwork.com)
"Rod" <ro**@newsgroup s.nospam> wrote in message
news:uJ******** ******@tk2msftn gp13.phx.gbl...
I've got 2 ASP.NET WebPages that I've written in VB.NET 2003. One of them has several controls on it, including at the bottom of the page an IFrame. The second ASP.NET page is supposed to have parameters passed to it in the query string. My problem is that I cannot figure out how to
programmaticall y change the parameters that are passed to the second

ASP.NET
page, from the first ASP.NET page.

How is this done?

Rod


Nov 18 '05 #4
Rod
Hi Steven,

You are correct, Bruce's suggest works like a charm. Your suggestion for
making a making a function to dynamically build the querystring looks as
though it would add to what Bruce provided.

Rod

"Steven Cheng[MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:h6******** ******@cpmsftng xa06.phx.gbl...
Hi Rod,

As for the dynamically setting querystring items passed to the inner iframe page, I think bruce 's suggestion is qutie good. First declare the <iframe
runat="server" id="frm"> element as a HtmlGenericCont rol, such as
protected System.Web.UI.H tmlControls.Htm lGenericControl frm;

so t hat we can reference it in code behind and then change the "src"
atrribute as we like. In addition, if you want to make it in the aspx page
inline, you can also define a function to dynamically generate the
querysting items , for example:

<iframe id="frm" src="innerpage. aspx?<% BuildQueryStrin g()%>">
"BuildQueryStri ng" can be a public helper function in the page class that
generate the querystring list.
Hope also helps.Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5

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

Similar topics

9
372
by: André | last post by:
Hi, How do I create an win 32 app and pass parameters to have it respond to the passed values? Like winzip "winzip32 -a" Kinda like Console args but I want to be able to call it via Start run helloworld.exe – something
2
746
by: Hadar | last post by:
Hi, I ran into a closed thread with the title "Want to be able to pass parameters to an IFRAME" The need to pass I tried to implement what they suggested but i got an error: "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>) "
5
2883
by: Apollo0130 | last post by:
hi, i want to pass a parameter (a string) between two forms. i have a Webform A (default.aspx) with a button and a Webform B (detail.aspx). i want to click the button and open the webform B with the parameter submitted from the webform A. how can i do that? greetz Apollo0130
6
3579
by: Woody Splawn | last post by:
I am using SQL Server 2000 as a back-end to a VS.net Client/Server app. In a certain report I use a view as part of the query spec. For the view, at present, I am querying for all the records in the table. But I am wondering if there is a way, at runtime, to pass values to the View (like start date and end date) so that I don't have to return every record in the table of my view. If I can't pass a parameter, perhaps I can create a view,...
0
1059
by: Helen | last post by:
I have a simple oledb dataset on one windows form in vb .net 2002 calling one column from oracle 7, results appear in a text box But, only the first results appears. Goal is to show all results in a drop down, then the user can choose one or several (do I pass these results to a separate text box?), and then pass the results (in the separate text box?) to a crystal 9 report, as parameters Am able to pass hard coded parameters in windows...
3
2124
by: Wang Xiaoning | last post by:
I have an customerdetail.xsl sheet ---------------------------------------------------------- <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="customer_number"></xsl:param>
3
8220
by: Joseph Lu | last post by:
Hi, all I have a stored procedure created in SQL Server like the following lines. // stored proceudre code starts here CREATE PROCEDURE sp_insertdata @strdata varchar(250) , @rsult BIT OUTPUT , @erridx CHAR(7) OUTPUT
1
1930
by: Hexman | last post by:
Hello All, I have a new challenge. I've created a Crystal Report (version 10) and saved the file. Now from my program I want to print it to an Adobe PDF file. My question is: How do I pass parameters thru Crystal to modify printer behavior? For Instance: 1. Pass it a path & filename to save to. eg; "C:\ReportDist\R100102-060902.pdf" (included the date in the filename) 2. Tell the Adobe PDF printer to overwrite an existing file if...
1
87625
by: eldokp | last post by:
hi, In my javaScript function iam using document.ReportListForm.submit(); for form submision My ReportListForm contains <form name="RoleListForm" method="Post" action="RIRoleList.do?PageCount=<%= rptBean.getPageCount() %>">
0
2113
by: PriyaManasarovar | last post by:
Can someone help how to pass parameters to a crystal report using a Crystal report object? I am using a console application & hence crystal report viewer cannot be used. And i need to pass the parameter through a batch file at run time? I have included a code here to pass parameters, but its giving invalid index error when i try to pass parameters: report1 = app.OpenReport(sfilename) crxDatabase = report1.Database ...
0
9704
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
9572
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10562
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...
1
10303
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
10070
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
9132
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...
0
5508
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...
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2978
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.