473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

FindControl doesn't work, please help!

Hi,
I have a master page and a content page. From my content page i can access the master page controls using Master.FindControl() but i cannot access controls from my content page using FindControl(). For any control it just returns null. I have been trying for so long with no success. so frustrated! Please help.

eg. FindControl("Table_Search") and FindControl("Content1") returns null.

<CODE>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="AdvancedLookup.aspx.cs" Inherits="AdvancedLookup" Title="Advanced Lookup" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder_Main" Runat="Server">

<table id="Table_Search" align="center" style="width: auto; border-bottom:black 1px solid; border-top:black 1px solid; border-left:black 1px solid;
border-right:black 1px solid; background-color:#C1D1E5" cellpadding="4" runat="server">

<tr>
<td style="width: 5px"></td>
<td></td>
</tr>
</table>

</asp:Content>

</CODE>
Oct 26 '07 #1
1 1315
Nevermind guys. I wasn't using ContentPlaceHolder to access the controls. :)
Oct 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ani | last post by:
I have a datalist control in my aspx page(this is paginated and everytime submits to itself). I am calling a function within my datalist that returns a html control (radio button ) in the form of...
1
by: Mike Speak | last post by:
On my page_load, I am populating a Datagrid through the normal manner (which works) before attempting to pick out the items in one column to use in another part of my page. This is all within...
4
by: MattB | last post by:
This is just a rephrased version of a question I posted earlier. I think I'm closer now, so it seemed worthy of a new (more specific) post. In my repeater I'm dynamically creating text boxes, so...
10
by: Joe | last post by:
Hi, Tried using the FindControl() but no luck in finidng this damn textbox having id txtFirstName. Can someone help me with this method? This is what I have been doing but it doesn't work, ...
5
by: sck10 | last post by:
Hello, I am using the code below to set the values of a DetailsView template field using FindControl. My question is how would you find a control if its a Boundfield control? For example,...
2
by: Bruno Alexandre | last post by:
Hi guys, I have this code: Dim gv As GridViewRow Dim str As String = "" Dim dd As DropDownList For Each gv In gvItems.Rows If gv.RowType = DataControlRowType.DataRow Then
24
by: Dennis | last post by:
I'm trying to use FindCrontrol and it will not work. Here is the code: Dim DisplayPanel As Panel DisplayPanel = CType(FindControl("pnlName"), Panel) No matter how I do it - I've tried...
4
by: Dave | last post by:
If you had a FileUpload control inside of a FormView...how would you use FindControl to access the FileUpload properties? Let me just say that...
7
by: AAaron123 | last post by:
Me.FindControl("MissionScheduleID"), below returns null. Do you know what I'm doing wrong? Thanks ***In my .aspx file I have: asp:Content ID="Content3"...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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
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
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...

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.