Click here to Skip to main content
15,311,104 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Ido search engine in & vb.nnet
i do all the code but the search result become in the same page

I want to take the value of the textbox and put itto another page , i think about it
session it maybe usefule , but when i used it not work well.

i put in vb page the behand page this

textbox1.text=session." "

and the second page (results)

textbox2.text=session." "

regards :doh:

Following link will help you to understand and use sessions. You can achieve your task using sessions easily.[^][^]

Hope this will help!
There are multiple ways to do that. Based on the requirement and what suits you, pick any one.

These all can do value transfer to another page. Read about them on MSDN if you arnt aware.
1. Sessions
2. QueryStrings
3. Application variables
4. PreviousPage property

About what you are trying to do, the way you have assigned the session is wrong:
meshosho wrote:
textbox1.text=session." "

1st Page:
Session["someValue"]= textbox1.Text;
2nd Page:
textbox2.Text = Session["someValue"].ToString();

MSDN link for session is already provided to you.
You can send value to the other page by using QueryString.

I prefering that alltime;

How can you do;

Sending page

< a hre f ="Example.aspx?Value=Hello World!">Click Me! < / a >

The Page who gonna take value
Write this code pages codebehind

protected void Page_Load(object sender, EventArgs e)
    //Get the value.
    string Value = Request.QueryString["Value"].ToString();
    //Show the value.
Also check for the cross page postback feature to pass control value to other page

here is link for that :[^]
A very good article on session. Exploring Session in ASP.Net

Hope it helps

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900