473,480 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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.

Apr 9 '06 #1
1 1491
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 ?


--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net
<ne***********@gmail.com> wrote in message
news:11*********************@z34g2000cwc.googlegro ups.com...
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.

Apr 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1245
by: wASP | last post by:
Hi, I was under the impression that, when ASP rendered a page, it recursively traversed the hierarchy, executing all controls in each ControlCollection of every control in that hierarchy. I...
2
6850
by: brianbender | last post by:
I am trying to load and unload assemblies dynamically and call methods and properties when loaded into an Appdomain I can load assemblies all day in the current AppDomain without references and...
9
21624
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter...
8
4260
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
4
1776
by: Matthew Burnside | last post by:
We're creating several different websites all based on a common framework, including a base page from which all pages inherit. This page is responsible for rendering the page layout, etc. I'm...
1
6048
by: Magdelin | last post by:
Hi, I have a BasePage class from which all other ASPX pages of the project is inherited. The BasePage class implements Page_Load event handler. All child pages have its AutoEventWireUp property...
2
3384
by: Samy | last post by:
Hi There, I have a user control with buttons on it which I use on a aspx page (parent page). On a button click, a modal dialog(aspx page) opens up and the user enters some info in the modal dialog...
12
4254
by: Dean Slindee | last post by:
My project has a main form (frmMain, the startup object for the project) and several other "child" forms that are painted within a large panel on frmMain. In each form's Form_Load event, a Weak...
3
2991
by: Sunny | last post by:
Hi, Can someone tell me, How to load the Body Html from a text file that contains javascript. to Manage my files I am creating an Index Page. <html> <head> <meta http-equiv="content-type"...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7037
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4770
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4476
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
176
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.