how to access child page control (check box) in master page

hi all,

       I need to implement it darely. can anybody tell me how can i access a child page check box in my master button event.

      i need it urgent. Pls help me as early as possible

Asraful

0
mdasraful
10/21/2008 11:56:45 AM
asp.net.navigation-controls 13714 articles. 0 followers. Follow

4 Replies
917 Views

Similar Articles

[PageSpeed] 26

hi,

check th link how to access controls in masterpage http://forums.asp.net/p/1330013/2670187.aspx#2670187


Please Mark as Answer if it helps you
0
naveen
10/21/2008 12:05:59 PM

Try  this

if (this.Master.FindControl(" contentplaceholder1").FindControl("chkboxID").Checked == false)

{

//your code stuff

}


Happy Coding...Smile
▌µùthùkûµâ₧á∩▐ .
0
ComputerSurgeon
10/21/2008 12:10:00 PM

U can do like this ..

Put one Hidden control in Master page.

Then in child page Page_Load Event handler

((HiddenField)Master.FindControl("HiddenField1")).Value = CheckBox1.Checked.ToString();

 

Then Master Page Button Click even write below line.

bool IsChecked = Convert.ToBoolean(HiddenField1.Value);


http://interviews.dotnetthread.com/


0
anilperugu
10/21/2008 12:25:50 PM
Reply:

Similar Artilces:

Accessing Master page control from child page
Hi, In my application I have implemented a customized error control, which gets visible on any error raised. Issue is, in one of the page where we have implemnted Update Panel, and onClick of a button I wants to raise a error on the control in Master page. The Page object has a Master property that will reference the properties of the master page.  Note that you will need to apply the MasterType directive to your page or use the Page.MasterPageFile property to reference the master page properties.Christopher Reed"The oxen are slow, but the earth is patient." hi, Y...

Problem Accessing Page Controls in a page that has a master page.
Hi,  I have a problem with accessing the controls of a page that has a masterpage. I am trying to access the Page.Controls from the code behind in the class file but no controls are returned.I can access single controls (ex. txtAddress.Text) but not the whole array of controls (ex. Page.Controls).  The controls structure is..                                 MasterPage  >  PlaceHolder > MyPage.aspx &n...

Accessing HTML control of Master Page in Child Pages
 Hi I have Following HTML element in master page (Outside ContenPlace Holder) and i want to access this in Child pages<span id="userLinks" runat="server">User Logged In </span> Sandeep PatilSoftware DeveloperPlease remember to click “Mark as Answer” on the post if it helps you.  Got the solutionHtmlControl userLinks = (HtmlControl)Master.FindControl("userLinks");And now accessing property of controluserLinks.Visible = true; Sandeep PatilSoftware DeveloperPlease remember to click “Mark as Answer” on the post if it helps you....

Accessing Master Page Control event from a child page
Hi, I was wondering if it is possible to access Master Page Control events from a child page. What I mean is, I have a button on the master page, I need to modify its onclick event on a particular child page, is there a way to do it? I know how to access the control attributes, i.e.: Dim Button as Button = CType(Master.FindControl("Button1"), Button), but I can't figure out how to accss its events. Please help, Many thanks, Alexi Got it... Page load event of the content page:         Dim mp As MasterPage = CType(Page.Master, Maste...

Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Why in the world am I getting this error? The solutions I have seen either don't apply or don't work.  Here is my master page code:<%@ Master Language="C#" AutoEventWireup="false" CodeFile="TechLMSMasters/MainSide.master.cs" Inherits="MainSide" %> <%@ Register TagPrefix="usercontrol" TagName="Search" Src="~/library/uc/Search.ascx" %> <%@ Register TagPrefix="usercontrol" TagName="UserName" Src="~/library/uc/UserNameDisplay.ascx" %><!DOCTYPE html PUBLI...

Finding a control in the master page from within a control on the "child" page....
I've seen several examples of finding controls, but I'm struggling with this.  I want to turn a panel to visible and set a label's text field from within a control... All the examples that I've seen, including the really good one at MSDN2 shows Master.FindControl.  When I use that, it says Master is not declared.  Is there an easy way to set the panel and the label from within the control? Am I close? '---------- My Master page...abbreviated... <%@ Master Language="VB" CodeFile="Secure_Master.master.vb" Inherits="MasterPage" %><%@ Register TagPrefix="cc" TagName="men...

ERROR Content controls have to be top-level controls in a content page or a nested master page that references a master page.
This all used to work until about 5 minutes ago. Did I change something? For some reason I am now getting this error: Content controls have to be top-level controls in a content page or a nested master page that references a master page. What I have:  I have a masterpage inside of a directory. That directory is a first level directory with its own web.config file....The whole thing is protected by the web.config file above it (in the main public directory). That main public directory has a masterpage as well. I am not currently linking the two masterpages together becuase...

Error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.
when I make a directory on my root, and in that directory I put a masterpage and a web form ... I get always an error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.   Does somebody know what the problem is ? Is it possible you can't set a masterpage in a directory ... ?Kind Regards,Joeri Pansaerts.From Bruges, Belgium :) i've founded ... I had to nest my masterpage ...Kind Regards,Joeri Pansaerts.From Bruges, Belgium :) Hi Joeri Pansaerts, I am receiving the same error as the one posted her...

Need to access a Label Control on the Master Page from a user control attached to a content page
Hello all, I have a master page (say  site.master)  with a status Label in it. I have a content page ( say content.aspx)  that has a user control (say usercontrol.ascx). One of the Button Click Events in the usercontrol.ascx needs to pass on some text onto the status label on the masterpage(LabelStatusMsg) and display it. I have been able to do this directly off a content page (content.aspx) by using the following code (VB)  on the master page <%@ MasterType virtualpath="~/site.master" %> and Dim mpLabel As Label = CType(Master.FindControl("LabelStatusMsg"),...

Model popup in master page not updating the child page list box control
 Hello, I am facing two unusual types of problems.  I have a Master Page that includes a Model Popup Extender code. When master page is loaded with inner child page, the child page has list box control to show address book list. The master page calls the model popup extender to edit the address books and add new address books. The issues comes, when I try to close the model popup extender that also saves the address book contacts. I want when this popup closes it should refresh the list box in child page with new address book data. Is it possible to block the AJAX call wh...

Control of the page and the controls on a page
I am building a web app that has some pages that are public and some that are only available based on subscription. Could someone explain the best way (infrastructure wise) how to control whether a server control is visible or enabledand how to control whether a page is viewable or not based on the user and whether or not the user is logged in (or not). If a user is not logged in I would like some controls to be visible but disabled. I also have to control the URL's in case a person learnsthe URL and tries to type it in. My question is more towards how to do this database wise. I am u...

Accessing Master Page Controls from Page
How can a page access its master page controls? Suppose a page's (.aspx) master file (.master) contains a control (e.g., Label myLabel).  How can one access the master file's control(s) within the scope of the page?  The this.Master.Controls collection (where this is the page in question) does not return what one would most likely think it would return. Hi    you can do this using javascript like    document.getelementbyid("<%controlname.clientid%>").value http://www.codeproject.com/KB/aspnet/InsideMasterPages.aspx http:...

Using controls from pages, master pages, and user controls
How would I structure my site in this scenario: I'd like to use a dropdownlist all over my site, sometimes in a regular page, sometimes in a master page, and sometimes in a user control.  I wish to bind its events programmatically, so normally I would just put that in the codebehind.  However, I notice a lot of code duplication because I have to declare the control in everywhere, in my base page (which all my pages inherit from), in my base master page (which all my master pages inherit from) and in my base user control (which all my user controls inherit from).How should I be...

i have 3 pages student information , i filled two pages ,then go to 3rd page . First Two pages iam having 100 controls.how to store that controls and how to send these controls into 3rd page in ?
i have 3 pages student information , i filled two pages ,then go to 3rd page . First Two pages iam having 100 controls.how to store that controls and how to send these controls into 3rd page in ?  There are a number of ways storing values. Check out: http://msdn2.microsoft.com/en-us/library/75x4ha6s.aspxhttp://www.csharphelp.com/archives/archive207.html Thanks,Karan~ Remember To Mark The Post(s) That Helped You As The ANSWER ~ Hi, Welcome to asp.net forums. Now as far as your requirements goes, the first thing that strikes me is that 100 controls are way too many to kee...

Web resources about - how to access child page control (check box) in master page - asp.net.navigation-controls

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

As it happened: Fire crews battle out-of-control blazes in southern states
Emergency warnings are in place for a fire burning in Victoria's north-east while fire crews also tackle blazes in ACT, NSW and Tasmania.

Review: Sugr Cube, the cute wooden portable AirPlay speaker with gesture controls
... rarer, pretty ones even rarer and the Sugr Cube goes one step further in its bid to stand out from the crowd: it offers gesture-based control. ...

Dell Issues Patch For Content Adaptive Brightness Control On The XPS 13
... issues, as all devices do. One that was very frustrating to deal with during the review was the aggressive Content Adaptive Brightness Control ...

This is how Amazon is taking control of delivery – and taking it away from UPS
As Amazon searches for ways to speed up delivery, the company this year made big strides toward cutting out the middle man and establishing a ...

Virginia AG Ends Concealed Reciprocity with 25 States for Lack of Gun Control
Virginia AG Ends Concealed Carry Reciprocity With 25 States For Lack Of Gun Control

Taliban forces take control of key district in Afghanistan's Helmand province
CNN Taliban forces take control of key district in Afghanistan's Helmand province CNN Kabul, Afghanistan (CNN) Taliban forces have taken almost ...

Taliban take control of Afghanistan's Helmand province - CNN.com
Taliban forces have taken almost full control of a key district in Afghanistan's southern Helmand province after several days of fierce fighting. ...

Kurt Russell Doubles Down: ‘Gun Control Won’t Stop Terrorists’
Kurt Russell Doubles Down: ‘Gun Control Won’t Stop Terrorists’

How Sepp Blatter Lost Control Of His Monster
If Sepp Blatter could take a step back and look at the bigger picture, forgetting for a moment that today’s eight-year ban from all soccer activities ...

Resources last updated: 12/23/2015 11:31:27 PM