CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 1/9/2007 9:30:48 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 26 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
zoltac007
Asp.Net User
Content page will not load masterPage control value.1/9/2007 9:30:48 PM

0/0

I have a TextBox control on my masterPage where users enter a zip code.  I want this zip code to be immediately written into the ContentPage TextBox or Label control when the user hits the Enter key or clicks on a Submit ZipCode button located on the master page.

I am currently using FindControl to access the masterPage control's value but it only pulls the information if the ContentPage is reloaded.  The masterPage control data appears to be getting loaded after the content page has been loaded and it never sees the masterPage's TextBox value.  What do I need to do to make the zip code entered by the user load into the ContentPage textbox or label on the first sequence when the user either clicks on a submit button located on the masterPage?

 

Nullable
Asp.Net User
Re: Content page will not load masterPage control value.1/9/2007 9:58:52 PM

0/0

Try this:

    // Run this code in Page_Load or OnInit of your Content Page


    TextBox
textBoxOnMasterPage = this.Master.FindControl("textBoxOnMasterPage") as TextBox;

    if
(textBoxOnMasterPage != null)
    {
        textBoxOnMasterPage.TextChanged +=
new EventHandler(delegate
        {
            // here is where you set the "Text" value of the label or
            // textbox on your Content Page.
        });
    }

Peace,


-Timothy Khouri
http://www.SingingEels.com/
Developer / Architect / Author
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
C# for Programmers: Updated for C# 2.0 Authors: Paul J. Deitel, Pages: 1317, Published: 2005
Visual C# 2005: How to Program Authors: Harvey M. Deitel, Paul J. Deitel, Pages: 1591, Published: 2006
Visual Basic 2005: How to Program Authors: Harvey M. Deitel, Pages: 1513, Published: 2006
ASP.NET 2.0: Your Visual Blueprint for Developing Web Applications Authors: Chris Love, Pages: 339, Published: 2007
Expert C# 2005 Business Objects Authors: Rockford Lhotka, Pages: 668, Published: 2006
Professional Community Server Authors: Wyatt Preul, Keyvan Nayyeri, Jose Lema, Jim Martin, Pages: 311, Published: 2007
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
ASP.NET 2.0 Instant Results Authors: Imar Spaanjaars, Paul Wilton, Shawn Livermore, Pages: 456, Published: 2006
Professional Community Server Themes Authors: Wyatt Preul, Benjamin Tiedt, Pages: 337, Published: 2007

Web:
Content page will not load masterPage control value. - ASP.NET Forums Content page will not load masterPage control value. Last post 01-09-2007 4:58 PM by Nullable. 1 replies. Sort Posts: ...
Content page will not load masterPage control value. - ASP.NET Forums Content page will not load masterPage control value. Last post 01-09-2007 4:58 PM by Nullable. 1 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
ASP.NET Library - Articles - Access Master Page controls from the ... So, our code behind for the Master Page will now consist of: ... Load ' Set the value of the Master Page's Label to the Content Page's TextBox txtTest. ...
Working With Master Page - Vikram Lakhotia When the times come for master page to work the master page will repalce ... Hence we should not have content page’s load event wait for the ...
MasterPage and viewstate issue They will take the same value as set for their parent page. But MasterPage CAN take the web.config value. Also, try placing a DropDownList control inside a ...
CodeProject: Master Page solution just like in ASP.NET 2!. Free ... Parser Error Message: Could not load type 'MasterPage.Global'. Source Error: ... load content Dim content As New Control content = Me.FindControl("Content") ...
CodeIdol - Thinking about ASP.NET 2.0 Illustrated - The Page Class ... If you do not provide a Content control in a Content Page for a ... use more than one Master Page and specify which Master Page each Content Page will use. ...
ASP.Net 2.0 - Master Pages: Tips, Tricks, and Traps Apr 11, 2006 ... When the master page finds a Content control that matches a ..... Obviously, problems will occur if the content page’s Load event handler ...
multiple Content page, Null reference to a control with Masterpage ... Though when you say to load content via the content page does that mean i ... ot have a class that will hold all my sub, but i am not how that can be done? ...
How to prevent MasterPage post back When a postback occurs, the Init and Load events for both the Master Page and the Content Page will be triggered. ...




Search This Site:










container's css not linked on some pages/portals

nested master page

css adaptors inside master pages

ms sql mdf database file attached vs created on sql server

ie web controls installation problem

using themes

.text installation on internal win2003 server

dnn 308 users module error help please

tabs toolbar in dnn

sql database

compiling

try to buy vs 2005 professional ed.

public role and auto assign under security roles

clearing/discovering control events

solpart menu with fixed item width

authentication on sub folders

caching within the footer

browsing file from server with basic autentication

asp.net 2003 site management through dnn

strange behavior in ibuyspy portal?

how to set up remote debugging?

questions for core team

setup a domain to "point" my private server

can i modify web.config file dynamically?

another treeview issue

please help, please, please

help! errors in web.config

design and source window together

problem with copied file duplicate code behind partial class names

rolegroup with roles attribute set to variable

 
All Times Are GMT