Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 8th, 2009, 05: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
Reply With Quote
  #2 (permalink)  
Old September 8th, 2009, 06:05 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,955
Thanks: 79
Thanked 1,556 Times in 1,533 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!
Reply With Quote
  #3 (permalink)  
Old September 8th, 2009, 06: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!
Reply With Quote
  #4 (permalink)  
Old September 8th, 2009, 06:26 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,955
Thanks: 79
Thanked 1,556 Times in 1,533 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!
Reply With Quote
  #5 (permalink)  
Old September 8th, 2009, 06: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
Reply With Quote
  #6 (permalink)  
Old September 8th, 2009, 06:45 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,955
Thanks: 79
Thanked 1,556 Times in 1,533 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!
Reply With Quote
  #7 (permalink)  
Old September 8th, 2009, 06: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 :)
Reply With Quote
  #8 (permalink)  
Old April 19th, 2010, 11: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
Reply With Quote
  #9 (permalink)  
Old April 24th, 2010, 08: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];
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 04:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.