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/8/2007 11:08:10 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 28 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
Totenkopf
Asp.Net User
accessing repeater control in master page from content page1/8/2007 11:08:10 PM

0/0

Hello,

In my master page, I have a repeater control named "repJobs" and I made it public like so:

    public Repeater Rep_Jobs
    {
        set
        {
            repJobs.DataSource = value;
            repJobs.DataBind();
        }
    }   

From my content page, I tried to assign a datasource to it (a DataTable named "dt") like this but it doesn't work:

Master.Rep_Jobs = dt;


How can I get this to work? 

 

 

Thank you in advance. 

 

 

 

Nullable
Asp.Net User
Re: accessing repeater control in master page from content page1/9/2007 3:31:06 AM

0/0

When it comes to MasterPages and ContentPages trying to access controls ... FindControl is your friend :)

this

.Master.FindControl("myControl"); // <-- You got it :)

Please mark this as the answer if it suits your needs (which it will)!

Thanks,


-Timothy Khouri
http://www.SingingEels.com/
Developer / Architect / Author
bitmask
Asp.Net User
Re: accessing repeater control in master page from content page1/9/2007 4:53:21 AM

0/0

Nullable:

When it comes to MasterPages and ContentPages trying to access controls ... FindControl is your friend :)

this

.Master.FindControl("myControl"); // <-- You got it :)

Please mark this as the answer if it suits your needs (which it will)!

Since the control already has a backing field in the master page there is no need for FindControl.

We'll have to assume the poster is seeing a compilation error because the property is not defined by System.Web.UI.MasterPage. This is a case where the @ MasterType directive will make the code work. See "Abstract Interaction" in http://odetocode.com/Articles/450.aspx.

Nullable
Asp.Net User
Re: accessing repeater control in master page from content page1/9/2007 2:27:32 PM

0/0

bitmask:
Since the control already has a backing field in the master page there is no need for FindControl.

What do you mean by that? Are you saying that he can do "this.Master.myControl"? Please explain.

Thanks,


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


Free Download:

Books:
Pro ASP.NET 2.0 E-commerce in C# 2005 Authors: Paul Sarknas, Pages: 617, Published: 2006
ASP.NET 2.0 Cookbook Authors: Michael A. Kittel, Geoffrey T. LeBlond, Pages: 989, Published: 2005
Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter Kit: visual web developer 2005 express edition starter kit Authors: David Sussman, Alex Homer, Pages: 312, Published: 2005
ASP.NET 2.0 Everyday Apps For Dummies Authors: Doug Lowe, Pages: 504, Published: 2006
ASP.NET 2.0 Instant Results Authors: Imar Spaanjaars, Paul Wilton, Shawn Livermore, Pages: 456, Published: 2006
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
Programming Microsoft ASP.NET Authors: Dino Esposito, Pages: 1165, Published: 2003

Web:
accessing repeater control in master page from content page - ASP ... accessing repeater control in master page from content page. Last post 01-09- 2007 9:27 AM by Nullable. 3 replies. Sort Posts: ...
How to Refresh DataList Control in Master page from Nested page ... Hi, I have a DataList control in a MasterPage that lists the contents of a shopping basket. The nested pages add products via a Class in ...
problems with referencing control from master page on content page referencing a menu control that is placed on a master page from a content page. Let me show you what I have got (VS 2005, VB.NET only): ...
Wiley::ASP.NET 2.0: Your visual blueprint for developing Web ... Avoid Caching Content with the Substitution Control. ... Create a Master Page. Apply a Master Page. Access Master Page Properties and Events. ...
Using repeater control or something like, to create custom menu ... I was thinking to use repeater control, but don't know how it use it. .... I was trying to find the way to access the Master page from the content page. ...
Tutorial 3: Master Pages and Site Navigation NET engine automatically merges the page's master page content and the ASP. ..... To reduce the page's view state let's set the Repeater control's ...
MasterType directive in Content Page - Haissam [MCAD] Feb 11, 2008 ... In the master page, we have a Label control (Label1) which we need to access its text property and change it from the content page. ...
UpdatePanel acts differently inside Content area of Master Page that page inside of the content area of a Master Page. Now the page ... I was offline all day today coverting my internet access ...
Efficient Data Paging with the ASP.NET 2.0 DataList Control and ... The data access layer was then implemented using a DataSet designer (choose ... Master master page, I’m using an control to dynamically build ...
TheMSsForum.com >> Asp >> LinkButton in Repeater control - The ... Do I find the master page content and then find the control within it? TIA - Jeff. Tag: LinkButton in Repeater control Tag: 524221. 6 · Access Masterpage ...




Search This Site:










ibuyspy store vs oscommerce

re-building error

meta names ==> removing dotnetnuke info.

usersonline - getonlineuserstatistics stored procedure incorrect statement

prolongin the formsauthentication

not getting the tree control

forms based authentication against a database of users

what is the problem using data explorer to edit table with guid?

very urgent problem : all users have admin access on production portal !!!

help me first module dnn 3.0.12

copying the aspnetdb to remote host site.

how to generate certificate

login control error message : failed to generate a user instance of sql server due to a failure in starting the process for the user instance. the connection will be closed.

login redirection

team system release date?

i have added some more user info fields and am getting an error.

iwam_w03server login error! when installing commerce starter kit.

how about a module with exchange server functionality ...

vs2005 sp1 problems

deleting files from hard disk

windows authentication & network groups

private messages 1.01

references in the vs2005 web application projects

createuserwizard event model?

how to set the publish folder

general what is and can it questions?

map quest

membership & profile provider question

can't move my modules to another page

style sheets and user controls

 
All Times Are GMT