A method on the Control class in the .NET framework that finds a control from its id. The control is only found if it is within the calling control's naming container.
Questions tagged [findcontrol]
374 questions
0
votes
1 answer
Access Parent Page Control in Child User Control
I have an aspx page in which I have Ajax UpdatePanel which has a AJAX Tabcontainer which has 5 tab. In First tab I have a DropDownList for ProductID. In the second tab I have used a UserControl whose parameter needs to be reflected based on…

Rohit Rohela
- 422
- 6
- 21
0
votes
1 answer
ASP.NET: How do I implement my own AssociatedControlID-like functionality?
I have two user controls A and B, where B depends on the existence of A in the same page.
I'm trying to implement some functionality like this:
I'm…

Deniz Dogan
- 25,711
- 35
- 110
- 162
0
votes
1 answer
Panel.FindControl not working
In my content page, I am having a Telerik:RadWindow which will be used as a Popup
I have an asp:Panel inside this findingPopup like below.

user007
- 1,504
- 2
- 18
- 51
0
votes
2 answers
Accessing a "HtmlGenericControl" from a Master Page where the control was created dynamically
I have a master page "default.master" and a content page "Store.aspx", each with their own code-behind page. In the code-behind of the master page, I am dynamically creating a label with some text in it. I want to look up the text of the label in…

Nicolai Dutka
- 340
- 1
- 4
- 16
0
votes
1 answer
Finding drop down list control from a stored procedure in edit item template of gridview in asp.net c#
I am trying to find a DropDownList control on the EditItemTemplate of a grid view, to populate it with results from a query before it is drawn, but the control is never found.
ddlParent == null
Always!
I may be missing something very obvious but i…

Adam Garner
- 1,235
- 10
- 17
0
votes
1 answer
Dynamically generated FileUploads can't give options
I'm adding at my ASPX page some controls dynamically. I need to add dynamically them, because the amount of controls depends on database record.
I'm using UpdatePanel and adding controls dynamically like that:
void AddFileUploadFields()
{
for…

Secret
- 2,627
- 7
- 32
- 46
0
votes
1 answer
assigning text by finding control
I am trying to assign text to a label by finding a control (textbox) on previous page.
The control is accurately found, but the text cannot be assigned. Intellisense does not show "Text" property. How to get the text?
protected void Page_Load(object…

who-aditya-nawandar
- 1,334
- 9
- 39
- 89
0
votes
2 answers
FindControl returns NULL in GridView
I am trying to manipulate a DropDownList, which is in a field of a GridView, from code-behind in ASP.NET. I am doing this by adding the reference to a local DDL with the FindControl method. However, it doesn't seem to work, I have tried multiple…

LeonidasFett
- 3,052
- 4
- 46
- 76
0
votes
1 answer
How to find GridView on Page
I have nested GridViews on my page (Default) and I need to get the ID of the GridView inside but it's returning null. I have an UpdatePanel outside the nested GridViews. It's using a masterpage.
GridView gv =…

Ram
- 661
- 2
- 12
- 37
0
votes
1 answer
How To handle Dynamic textBoxes within dynamic table?
I want to SUM UP(add) values from textboxes in same columns and display SUM to last row Textboxes respectively on click of "Calculate" Button
All the textboxes are generated dynamically on click of “Create table” button.
I am not getting how to…

Nishant SB
- 67
- 2
- 16
0
votes
2 answers
FindControl is not working as expected?
I have this structure :
Page
|
+---Ascx
|
+---
|
+---
I already know that Findcontrol doesn't work recursively .
However when I pressed the button and went to…

Royi Namir
- 144,742
- 138
- 468
- 792
0
votes
2 answers
Setting focus to the User Name TextBox field of an ASP.Net LoginView
Using this ASP.Net LoginView, we would like to set focus on the User Name TextBox when it's loaded on the web page:

Emad-ud-deen
- 4,734
- 21
- 87
- 152
0
votes
2 answers
Using FindControl method of FormView within a Repeater
I need an advice how to correct my code. I am using FindControl method to find TextBox inside Repeater. This is my markup:
HERE ARE SOME OTHER DATA
user2061217
0
votes
1 answer
ClientID via FindControl() different from Generated ID in html
I have a literal defined in a usercontrol which is embedded in an aspx and itself embedded in a Masterpage.
this.Parent.FindControl("litError") returns me the control... but the client ID is "phContent_litError". It does find the control on the…

Gotcha
- 1,039
- 1
- 16
- 24
0
votes
1 answer
ASP.net - Adding a control in code, how do I get it via FindControl()?
I create a table in code, add rows and then cells to it. In each cell there is a checkbox which has an ID I set.
I add this table to an updatepanel, and later on I want to find out which checkboxes the user has checked/unchecked.
I don't know the…

NibblyPig
- 51,118
- 72
- 200
- 356