?
Solved

text box in the master page retaining text across content pages

Posted on 2010-11-11
3
Medium Priority
?
558 Views
Last Modified: 2012-08-13
I have a text box in master page. When the user enters text and hits on the search button, the user is redirected to another content page. However the value in the textbox that was entered by the user is not retained in the new content page. Please suggest how I can retain the value. thanks
0
Comment
Question by:TrialUser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
Richard Lee earned 1000 total points
ID: 34111355
If you use a redirect to another page then the ViewState is lost. ViewState is per page and used to maintain the value of the textbox across postbacks. Saying all of that I get to the solution finally - you will need to pass the value across to the other page. The best way is by QueryString. Why I hear you ask, well you could just as done with google distribute a search just using the URL.

DaTribe
0
 
LVL 10

Assisted Solution

by:P1ST0LPETE
P1ST0LPETE earned 1000 total points
ID: 34111870
There is a multitude of ways you go about doing this.

1. Store value in Session Variable: http://www.codeproject.com/KB/aspnet/ExploringSession.aspx

2. Store value in Cookie: http://www.geekpedia.com/tutorial81_Handling-cookies-in-ASP-.NET.html

3. Access Previous Page Values: http://www.aspdotnetfaq.com/Faq/How-to-make-Cross-Page-Postback-in-ASP-Net.aspx

4. Storing value in Query String: http://www.aspnet101.com/2007/07/querystring-results-and-sql-statements/

5. Store value in database on source page, then access the value on target page.
0
 

Author Closing Comment

by:TrialUser
ID: 34114425
thx
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question