User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,197 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,943 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2148 | Replies: 6
Reply
Join Date: May 2007
Posts: 23
Reputation: thirunavukaras is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
thirunavukaras thirunavukaras is offline Offline
Newbie Poster

Help i want to send labelbox value with redirect page

  #1  
May 5th, 2007
i created one web form

the form contain two label box and text box

in the form one button is placed

i click the button the page redirect to next page

window.location.href="fdfgd.com";

but

i wll send textbox value and label box value in the corresponding redirect page..
pl help me...
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: i want to send labelbox value with redirect page

  #2  
May 7th, 2007
hopefully, this will get you going in the right direction.
var tb = document.getElementById('TEXTBOXID');
var tbVal = '';
if(tb !=null)
 tbVal = tb.value;

window.location.href="fdfgd.com?tbVal="+tbVal;
Last edited by campkev : May 7th, 2007 at 4:08 pm.
Reply With Quote  
Join Date: Jun 2006
Location: Bel Air, MD
Posts: 24
Reputation: rkamin1 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 2
rkamin1's Avatar
rkamin1 rkamin1 is offline Offline
Newbie Poster

Re: i want to send labelbox value with redirect page

  #3  
May 8th, 2007
exactly as campkey said, you can pass the values as part of the query string or you can store it in the session variable.
Reply With Quote  
Join Date: Nov 2005
Location: Mostar
Posts: 89
Reputation: ManicCW is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 10
ManicCW's Avatar
ManicCW ManicCW is offline Offline
Junior Poster in Training

Re: i want to send labelbox value with redirect page

  #4  
May 9th, 2007
Why do you even redirect using javascript?
Use code behind to redirect it.

In click event of the button:
Response.Redirect("~/MyPage.aspx?MyQuery=" & Me.MyTextBox.Text.Trim)
Last edited by ManicCW : May 9th, 2007 at 3:15 am.
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: i want to send labelbox value with redirect page

  #5  
May 9th, 2007
Originally Posted by ManicCW View Post
Why do you even redirect using javascript?
Use code behind to redirect it.

In click event of the button:
Response.Redirect("~/MyPage.aspx?MyQuery=" & Me.MyTextBox.Text.Trim)

why? Because it saves you a roundtrip and a server call, and is faster and more efficient.
Reply With Quote  
Join Date: Mar 2007
Posts: 32
Reputation: sibotho is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
sibotho's Avatar
sibotho sibotho is offline Offline
Light Poster

Help Re: i want to send labelbox value with redirect page

  #6  
May 16th, 2007
Originally Posted by campkev View Post
why? Because it saves you a roundtrip and a server call, and is faster and more efficient.


Can you please show me this code in C#. I also have the same problem.
Reply With Quote  
Join Date: Nov 2005
Location: Mostar
Posts: 89
Reputation: ManicCW is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 10
ManicCW's Avatar
ManicCW ManicCW is offline Offline
Junior Poster in Training

Re: i want to send labelbox value with redirect page

  #7  
May 9th, 2007
Because it saves you a roundtrip and a server call, and is faster and more efficient.

Well OK, but I don't think he's gonna save much.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 3:50 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC