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

Ido search engine in asp.net & 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:
Posted

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

http://msdn.microsoft.com/en-us/library/ms178581.aspx[^]

http://msdn.microsoft.com/en-us/library/ms972429.aspx[^]

Hope this will help!
 
Share this answer
 
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.
 
Share this answer
 
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.
    Response.Write("alert('"+Value+"');");
}
 
Share this answer
 
v3
Also check for the cross page postback feature to pass control value to other page

here is link for that : http://www.c-sharpcorner.com/UploadFile/DipalChoksi/xpgpostbk_asp2_dc08102006235543PM/xpgpostbk_asp2_dc.aspx[^]
 
Share this answer
 
A very good article on session. Exploring Session in ASP.Net

Hope it helps
 
Share this answer
 

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