Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 8th, 2009, 04:23 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Question Pass value to second page (create & pass var)

Good day, I need help and Don't know how to do.

I have 2 apsx pages: 1 aspx page calls the 2 aspx page.

But now in the 2 page I have a textbox with a btn to redirect to an url page passing the text box value as parameter for url report.
What I want is to move the the textbox to the 1 page
and pass the value of the 1 page textbox to 2 page url.

[code1:]
Page 1 call page 2
TargetUrl="Page2.aspx"

Page 2
<input type="text" text="Keyword" id="keyword" value="">
<IFRAME id="frame1" src="http://server&KEY = 'keyword'>
[/code:]

Please provide some code or examples.
Regards
 
Old September 8th, 2009, 05:05 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I don't understand what you're trying to accomplish. Can you provide more information and a better description of the situation?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 8th, 2009, 05:22 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Question

Thanks for assisting.

I would like to have a textbox in Page1.
The Page2 has an iframe with src being a report url with a parameter.

When Page1 triggers Page2 I would like to pass the Page 1 textbox value to the Page 2 url parameter.

Page1 Textbox : <input type="text" text="Keyword" id="keyword" value="">
Page1 Trigger Page2 : TargetUrl="Page2.aspx"

Page 2
URL Parameter KEY
src="&KEY = Page1 textbox (Keyword) value

I think in Page 2 I have to define a variable and the in Page 1 I have to pass the var by:
TargetUrl="Page2.aspx?Var=testvalue"
but i don't know how (code)

Please Assist!
 
Old September 8th, 2009, 05:26 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I still don't get it. What do you mean with "Page1 triggers Page2 "? How do you "trigger" the other page? Through a Response.Redirect? Or a Server.Transfer? Or maybe you're using cross-page postbacks?

You need to provide more, specific info, including relevant code.... "triggering" is a bit too vague....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 8th, 2009, 05:39 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Question

Apologies, The pages are aspx file extensions with HTML code format

Page1:
<ignav:Item TargetUrl="Page2.aspx" TagString="" HoverClass="mnuMainHover"
TargetFrame="" CssClass="mnuMain" Text="Home" ToolTip="Navigate to Home"> </ignav:Item>

Sorry not trigger but navigates: Page2.aspx
 
Old September 8th, 2009, 05:45 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I hate to be a pain, but this is still not telling me a whole lot. What is ignav:Item? Is it creating client side links? Postbacks buttons? Link Buttons? Can't tell. And "not trigger but navigates" is not too clear either. Navigating can be done in many differnet ways, both client side as server side.

Let's turn it around. Here's a link to an article about passing info from page to page: http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx

That should contain the info you need.

If it's a client side solution, take a look here:

http://www.google.com/search?hl=en&q...t&aq=f&oq=&aqi=

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 8th, 2009, 05:54 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Sorry for wasting your time, i think what i'm looking for is HTML or Javascript

Thank You :)
 
Old April 19th, 2010, 10:51 AM
Registered User
 
Join Date: Feb 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default calling session variable using javascript and using RESONSE.REDIRECT.

Can i calling session variable using javascript and using RESONSE.REDIRECT. in asp.net
 
Old April 24th, 2010, 07:03 AM
Registered User
 
Join Date: Jan 2010
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Code:
Default.aspx.cs

string tmp=TextBox1.text; Response.Redirect("Default2.aspx ?",+tmp);
Default2.aspx.cs
string tmp1=Request.QueryString[0];




Similar Threads
Thread Thread Starter Forum Replies Last Post
create stored procedure+pass qry textbox Pradeep_6323 Struts 0 March 12th, 2008 02:03 AM
create pass through query to connect to Sybase mustang123 Access VBA 2 August 16th, 2007 06:36 AM
pass the value of one page to another.... rocksbhavesh BOOK: Beginning ASP.NET 1.0 1 March 14th, 2007 06:36 AM
how to pass structure to DLL & retrieve them? keepsmiling_sruti VB How-To 4 July 15th, 2005 01:10 PM
Pass parameter to store procedure & Crystal Report quinn Classic ASP Professional 0 March 10th, 2004 02:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.