473,387 Members | 1,504 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.

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
programmatically 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 8946
in aspx:

<iframe id="footer" runat=server >

in code behind

footer.Attributes["src"] = "page2.aspx?p1=" + HttpUtility.UrlEncode(p1);
-- bruce (sqlwork.com)
"Rod" <ro**@newsgroups.nospam> wrote in message
news:uJ**************@tk2msftngp13.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
programmatically 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 HtmlGenericControl, such as
protected System.Web.UI.HtmlControls.HtmlGenericControl 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?<% BuildQueryString()%>">
"BuildQueryString" 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**************@TK2MSFTNGP11.phx.gbl...
in aspx:

<iframe id="footer" runat=server >

in code behind

footer.Attributes["src"] = "page2.aspx?p1=" + HttpUtility.UrlEncode(p1);

-- bruce (sqlwork.com)
"Rod" <ro**@newsgroups.nospam> wrote in message
news:uJ**************@tk2msftngp13.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
programmatically 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.microsoft.com> wrote in message
news:h6**************@cpmsftngxa06.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 HtmlGenericControl, such as
protected System.Web.UI.HtmlControls.HtmlGenericControl 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?<% BuildQueryString()%>">
"BuildQueryString" 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
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...
2
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...
5
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...
6
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...
0
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...
3
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"...
3
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...
1
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...
1
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"...
0
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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,...
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.