473,729 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

protected void Page_Load(objec t sender, EventArgs e)
{
TextBox mpTextBox =
(TextBox)(Maste r.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.mast er 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 1505
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******** *************@z 34g2000cwc.goog legroups.com...
protected void Page_Load(objec t sender, EventArgs e)
{
TextBox mpTextBox =
(TextBox)(Maste r.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.mast er 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
1265
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 tried adding a Button control to a TextBox ControlCollection, and it didn't execute. When I add the control to the Placeholder ControlCollection (after the TextBox control is added), it executes without any problem:
2
6874
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 without interfaces if need be. But try as I may they will ot unload. I have been working on this problem for weeks. I have seen other apps using Remoting but I know there has got to be a way to create a child AppDomain and reference obkect via...
9
21645
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 the results in the grid. Say you filter the grid for records that have a certain condition set to "NO" (in this case a checkbox). In this scenario the search returns one result. If I then check the checkbox ("YES") and save it, I now get my message...
8
4279
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 which is related to the repeater. In the code shown below, if I call Repeater1.Controls.Count in the OnInit (the code fragment was highlighted in yellow) , the viewstate for the repeater will be lost during the postback. You can re-produce this...
4
1790
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 implementing a bit of functionality that reads an XML file for scheduled website downtimes; if there is a current downtime entry, the parent page removes any and all child controls that have been added by the child page, and presents a few literal...
1
6081
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 set to false. I have included the code used to create the BasePage and one of the child pages below. // Class BasePage public class BasePage : Page {
2
3415
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 and clicks the save button on it. The info is saved to the DB and the parent page is refreshed. Everything works fine but for some reason the page load is called twice. I have set the AutoEventWireUp = false on every page. Also I have load event...
12
4289
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 Reference for that form is loaded into a global Hash table, like this: Dim wr As WeakReference = New WeakReference(Me, False) If Not hashTable.Contains(cfrmMain) Then
3
3009
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" content="text/html; charset=utf-8"/> <title></title>
0
8925
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9288
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9206
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9154
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8156
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6026
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4797
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2166
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.