How do I load a specific child page with a button or ddl?

N

needin4mation

protected void Page_Load(object sender, EventArgs e)
{
TextBox mpTextBox =
(TextBox)(Master.FindControl("txtFreeSearch"));
Response.Write("mp" + mpTextBox.Text); //only works the second
time


}

Related to another post I had. Two pages. One master, one child page.
I have a textbox on the master with a textbox and a button. They are
not inside any contentholder. They are just regular asp.net controls
on the master page.

When I enter data in the textbox and hit the button the childpage is
called back via postbackurl, which is ths only way I know to call the
childpage. Is this wrong? How else would I load the childpage when
the button and textbox are on the masterpage and another child page is
already loaded (default.aspx).

So, if you can visualize, I have masterpage.master and it has a search.
A textbox and a button. The Default page is loaded, but the textbox
and search are on the master, available to every page.

I click the button, it uses postbackurl to call the page that displays
the gridview results, the value is not passed the first time. The
second time it is. And when I say second, I mean the child page is now
the gridview page, not default.

Thanks again for anything helpful. It was all drag and drop until now.
I don't see how drag and drop can reference values on the master.
 
O

OHM \( One Handed Man \)

You're confusing me a bit here !

OK, I understand you have a master page with a textbox and button. which you
have appiled to two pages Default.aspx and aditionally to your gridview.aspx
is this correct ?

Also . . .

While Default.aspx is displayed, you enter the text into the box and then
press the button and call the gridview.aspx, your data does not display,
correct ?

Also . . .

With the next press of the button, your data is displayed, correct so far ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top