ASP.Net 2.0 request.form not working with master page

I have a form containing a text box where users can type in a keyword and search a database.  Everything is working fine until I incorporate it into a content page with a master page.  Once I do that, Request.Form("Keyword") does not seem to be working.  I'm using ASP.Net 2.0, Visual Web Developer, and VB.  Is there something I should/could be using other than request.form to capture the value in the keyword field?  Thanks for the help.
____________________________________________
My content page contains the following:

<%@ page language="VB" masterpagefile="~/Site.master" codeFile="Default.aspx.vb" Inherits="_Default"%>

<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" Runat="server">
____________________________________________
My master page contains:

<asp:ContentPlaceHolder ID="mainContent" runat="server" />

drees727Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

brwwigginsIT ManagerCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
raterusCommented:
Using Request.Form isn't really a good ASP.net approach.  I don't see this textbox you are using on your master page, but assuming it is there, you could try this.

masterValue = Page.Master.myTextBox.Text
drees727Author Commented:
The text box is on the content page and not the master page.  That seems to be the root of the problem.  I'm using the following on the content page:

<asp:TextBox ID="Keyword" runat="server"></asp:TextBox>

raterusCommented:
Why are you using Request.Form anyway?  That's not how we access textbox or any other posted values in asp.net.  You should be using the control reference that asp.net gives you to use to get at the value.  I'd have to guess if you look at the HTML source, you'll see that your textbox has a funky ID now, which you should never try to "guess" in code.
drees727Author Commented:
Both experts provided solutions that helped resolve the problem.  I'm going to split points but for some reason the Split Points page is not working (won't let me select more than one answer).  I'll contact EE to see if I can get it resolved.  Thanks for the help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.