Questions tagged [findcontrol]

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.

374 questions
0
votes
1 answer

using findcontrol to find a control within a literalcontrol

i have a custom control that renders a number of literalcontrols in the createchildcontrols method. as below (there are other lines of literalcontrols being added that i have not uncluded here) this.Controls.Add(new…
nat
  • 2,185
  • 5
  • 32
  • 64
0
votes
0 answers

Can't find a control within a control

Google seems to think I should be able to do this: Basically I'm creating textboxes/checkboxes in a listview in code behind and I'm try to get their values. Easy enough, each item has a panel and in that is a hiddenfield with the id value and a…
Tod
  • 2,070
  • 21
  • 27
0
votes
1 answer

Locating dropdownlist inside of asp.net gridview template field in C#

So i have this gridview as shown below:
perkes456
  • 1,163
  • 4
  • 25
  • 49
0
votes
2 answers

Changing the color of a custom control

I am trying to set the background color of a custom button. I build that button from HTML by overriding the Render method. I then expose certain attributes through customer overridden attribute methods with Get and set capabilities. This allows my…
Fearghal
  • 10,569
  • 17
  • 55
  • 97
0
votes
1 answer

how can i access a textbox which create dynamically?

when i creat unlimited textbox in gridview dynamically how can i access them? for example: int uste_uzaklik = 30; int nesne = ListBox1.Items.Count; Array.Resize(ref textboxarray, nesne * nesne); for (int str = 0; str < nesne; str++) …
0
votes
1 answer

Finding a certain cell in gridview through the use of column and row

I have a populated gridview that consist of template fields. I would like to find/check a certain number of cells using values of rows and columns. Eg: |Time|col1|col2|col3|col4|col5| |1200|------|-----|-----|------|-----| |1300|------| -X-…
0
votes
2 answers

GridView Button reference on rowdatabound

I feel like I'm missing something obvious here but I'm just not getting it. I have a gridview with a template field column where i have a button and a hidden field. I'm trying to get the reference to both the button and the hidden field on row…
Kritner
  • 13,557
  • 10
  • 46
  • 72
0
votes
2 answers

ASPxGridView Find control (Checkbox) and Check if it is checked or not

I have a checkbox (you can see below) nested in detailed grid. How can I find it on updating click and check if checked or not? I'm using DevExpress GridView
Jorge
  • 1
  • 1
  • 1
  • 1
0
votes
1 answer

Show cart details on a button click event

I want to show my cart details on a Button_Click_Event. I'm using a Gridview control of ASP.NET framework. But the following exception occurs: object reference is not set to a instance of an object. How can I fix it? Here is my code: protected void…
Anurag Dixit
  • 27
  • 1
  • 1
  • 11
0
votes
1 answer

Looping through a datalist on another page

I have a datalist on an ascx page called shippingorders1 and I am trying to access the label called lblGiftCodeAmount. I am trying to loop through the datalist and retrieve the text of the label convert it to decimal and sum it. In a click event…
Joe W
  • 1,567
  • 6
  • 23
  • 36
0
votes
2 answers

FindControl Returns a Null Reference

I have two textboxes and I use FindControl() to access them:
Nathan
  • 1,220
  • 3
  • 15
  • 26
0
votes
1 answer

Whats the best way to work with formview and .findcontrol

I have formview and add logic to it when updating,inserting etc... However on each subroutine, I had to a a variable and a findcontrol in order to work with that control. Now, my code is bigger and harder to read. My other approach was to put the…
causita
  • 1,607
  • 1
  • 20
  • 32
0
votes
0 answers

Method to find all server controls of a page in asp.net webforms

Is there some generic method to find all server controls of a page in asp.net webforms? I'm using this method to do that, but it is not finding the controls inside an asp:Repeater: private void GetControlList(ControlCollection controlCollection,…
Cristiano Sarmento
  • 633
  • 2
  • 9
  • 19
0
votes
2 answers

FindControl and Get Selected Value of Dropdown

This scenario is occurring when using C# code behind to find HTML Controls added dynamically from SQL Data Results. Using the following there is an iteration though the Table rows and row each table row, we write the Controls value, in this case a…
JS1986
  • 1,920
  • 4
  • 29
  • 50
0
votes
1 answer

Get text value from dynamically creating text boxes

Given multiple dynamically created textboxes, I want to get the text filled by the user. I used a Panel and the creation works. The control for the textbox is not found. ASPX
Kevin
  • 1