i want to send labelbox value with redirect page

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2007
Posts: 23
Reputation: thirunavukaras is an unknown quantity at this point 
Solved Threads: 0
thirunavukaras thirunavukaras is offline Offline
Newbie Poster

i want to send labelbox value with redirect page

 
0
  #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...
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 483
Reputation: campkev is an unknown quantity at this point 
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: i want to send labelbox value with redirect page

 
0
  #2
May 7th, 2007
hopefully, this will get you going in the right direction.
  1. var tb = document.getElementById('TEXTBOXID');
  2. var tbVal = '';
  3. if(tb !=null)
  4. tbVal = tb.value;
  5.  
  6. window.location.href="fdfgd.com?tbVal="+tbVal;
Last edited by campkev; May 7th, 2007 at 4:08 pm.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 25
Reputation: rkamin1 is an unknown quantity at this point 
Solved Threads: 2
rkamin1's Avatar
rkamin1 rkamin1 is offline Offline
Light Poster

Re: i want to send labelbox value with redirect page

 
0
  #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 Quick reply to this message  
Join Date: Nov 2005
Posts: 95
Reputation: ManicCW is an unknown quantity at this point 
Solved Threads: 11
ManicCW's Avatar
ManicCW ManicCW is offline Offline
Junior Poster in Training

Re: i want to send labelbox value with redirect page

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

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

Re: i want to send labelbox value with redirect page

 
0
  #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:
  1. 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 Quick reply to this message  
Join Date: Nov 2005
Posts: 95
Reputation: ManicCW is an unknown quantity at this point 
Solved Threads: 11
ManicCW's Avatar
ManicCW ManicCW is offline Offline
Junior Poster in Training

Re: i want to send labelbox value with redirect page

 
0
  #6
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 Quick reply to this message  
Join Date: Mar 2007
Posts: 32
Reputation: sibotho is an unknown quantity at this point 
Solved Threads: 0
sibotho's Avatar
sibotho sibotho is offline Offline
Light Poster

Re: i want to send labelbox value with redirect page

 
0
  #7
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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC