Get value from a textbox from another form (masterpage)

Question:

Hi there

Wonder if you can help me?

I’m using VS2005/C#/ASP.NET

I have a masterpage, and in that I have a textbox (txtSearch). I’ve also have a search.aspx file that uses the masterpage. My problem is, I’m trying to access txtSearch, but it dosnt appear in the intellisense?

The masterpage, as I said has the txtSearch and a button called search, when I click on it, it does a Response.Redirect(“search.aspx”);

What I would like is in the search.aspx file, I’d like to take the value of the txtSearch textbox. How do I do it? I can use a querystring, but I dont want to, and I guess I can use a session, and again, I dont really want to do that, also I dont want to use Request.Form.

In .NET 2.0, theres another way to get hold of values from another form, but I cant remember how to do it.

Can someone please help me in getting the vale from a txtSearch

Many thanks
Mousemat24

Solution:

if you do it all in one browser window, there is no way to access your master page – all controls are rendered anew everytime the page is displayed.

why do you not want to use query string/session/view state? that would be the best way to do it and depending on what you use (e.g. session) is most secure..

regs,
yurich

Tags: · · · ·
digg delicious stumbleupon technorati Google live facebook Sphinn Mixx newsvine reddit yahoomyweb
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...