2 Replies - 7331 Views - Last Post: 15 September 2009 - 03:19 AM Rate Topic: -----

#1 ismailc  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 98
  • Joined: 14-September 07

Pass values from one aspx page textbox to another aspx page textbox

Posted 09 September 2009 - 02:05 AM

Good day, I need help.

I would like to pass values from one aspx page textbox to another aspx page textbox.

I'm editing the pages & adding code (so no clue what i'm doing) i thought of javascript but no luck on passing the value to the next pages textbox.

On the 1st aspx page textbox1 onclick button go to another aspx page passing the value of the 1st Page Textbox1 = 2nd Page Textbox2

Page1 Apsx
<input type="text" text="Textbox1" id="Textbox1" value="">
<button to call 2 page passing the value>

Page2 Aspx
<input type="text" text="Textbox2" id="Textbox2" value="VALUE OF PAGE1 TEXTBOX1">

Please assist & provide code to send & define the var for second page

Regards

Is This A Good Question/Topic? 0
  • +

Replies To: Pass values from one aspx page textbox to another aspx page textbox

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: Pass values from one aspx page textbox to another aspx page textbox

Posted 09 September 2009 - 03:26 AM

You can either use the QueryString or use a Session variable.
Was This Post Helpful? 0
  • +
  • -

#3 ankurwase  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 10
  • Joined: 12-June 09

Re: Pass values from one aspx page textbox to another aspx page textbox

Posted 15 September 2009 - 03:19 AM

Hi there,

One thing u can do is by query string or session as said by eclispsed..

The other thing u can do is by adding the following tag below ur page directives in aspx

<%@ PreviousPageType VirtualPath="~/PreviousPageName.aspx" %>

Dim pgSource as New PreviousPageName

Dim txtbox2 As TextBox = CType(pgSource.FindControl("txtbox1"), TextBox)



txtbox2=textbox of new aspx
txtbox1=textbox of previous aspx

if you find answer useful please mark it as useful

Cheers.. :^:
Was This Post Helpful? 1

Page 1 of 1