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
2 answers

How to make the label visible using c# code in MVC3?

Following is the Label in my view page, Following is my Controller Method, …
user2514925
  • 931
  • 8
  • 33
  • 56
0
votes
1 answer

Page.FindControl from WebServerControl

I use a WebServerControl "CheckBoxCounter", which has the following method. But the method is unable to find the CheckBoxList on the page. I'm searching for an answer for nearly a day now... can you help me... The WebServerControl is in a…
The King
  • 4,600
  • 3
  • 39
  • 58
0
votes
2 answers

Getting the Control inside a table

I'm trying to get the control which is inside of a cell table; in my table I have different controls, labels, checkboxes, etc. I basically need to get the control which is used in that table var x =…
user2836518
0
votes
1 answer

Add multiple Cells to TableRow

Solution to add 2 cells to a asp:Table TableRow. I'm pulling the data for the table from a database and removing the comma separated items with the string function. protected void listView_Bids(object sender, ListViewItemEventArgs e) { if…
brandozz
  • 1,059
  • 6
  • 20
  • 38
0
votes
3 answers

ASP.net FindControl return null

I have code like this protected void Button1_Click(object sender, EventArgs e) { Table t = new Table() ; t.ID = "T1"; t.Visible = true; MyPanel.Controls.Add(t); } protected void Button2_Click(object…
Foxxed
  • 13
  • 1
  • 5
0
votes
1 answer

DataGrid finding a control

HI I have a DataGrid (yes would be nicer if it was a gridview but nothing i can do about that) in the itemDataBound event i am adding a hidden field into the first cell of each row I am setting its ID based on something, and then saving its clientID…
nat
  • 9
  • 2
0
votes
1 answer

C# - Find LoginView Control within MultiView

How to access LoginView1 control inside Multiview1, View2? I have a some textbox and dropdownlist in loggedIn template of View 2 within Multiview, I need to get the control and bind with text from database. I had…
Yee KC
  • 1
  • 1
0
votes
5 answers

How can i find a control in the footer template of a data repeater

ASPX : Code What i am looking for is source code…
sia
  • 2,185
  • 4
  • 20
  • 17
0
votes
0 answers

Cannot FindControl on button in an Ajax Accordion

I've burned three days trying to get this to work and implemented every suggestion I could find here on SO and other sites I Googled up. No joy. This is a VERY common problem and I'd think it would be easier to solve. Clearly I'm missing…
DJGray
  • 504
  • 8
  • 26
0
votes
1 answer

asp.net findcontrol method return null after AsyncPostBackTrigger

I have a big problem that is when I use full post-back I can find controls in my ..._ItemDataBound(...) event in my DataList, but when use AsyncPostBackTrigger I can't find controls and gives me null. Here's my aspx code:
teardrop
  • 545
  • 3
  • 9
  • 18
0
votes
0 answers

How to FindControl on Page which is added dynamically from UserControl

Actually, I am adding UserControl which is having TextBox and ComboBox to a Panel on my Page. Now, I need to show some text in the TextBox by Finding the Control. My UserControl:
RealSteel
  • 1,871
  • 3
  • 37
  • 74
0
votes
1 answer

How to find dynamic control inside a dynamically added container

In my website I am uploading photos through asp:FileUpload [multiple files - images].. After uploading I am displaying them in a Panel along with a textbox to write description for the uploaded Images. Then am going to save them in database. But I…
Guruprasad J Rao
  • 29,410
  • 14
  • 101
  • 200
0
votes
2 answers

How can I find a Control inside WizardStep?

I'm using the CreateWizardStep for create user to my site... I added new step and inside the step a put a CheckBoxList, but I'm trying to search this control but it return null reference error, below a code snip: ASPX
gvd
  • 1,482
  • 6
  • 32
  • 58
0
votes
2 answers

Have I to cache FindControl() result if I use it a number of times?

Does FindControl() work quick or not? Have I to cache a result using a property like this or not if I search and use the same control a number of time? private MyUserControl c; private MyUserControl MyC { get { if(c == null) …
abatishchev
  • 98,240
  • 88
  • 296
  • 433
0
votes
1 answer

FindControl inside repeater not working

I've got a repeater and inside on of the tags I've got a checkbox, which .Checked property I want to set inside the ItemDataBound event of the repeater. The problem is that args.Item.FindControl("checkboxSelect"); returns me null. Here is the…
Anton Belev
  • 11,963
  • 22
  • 70
  • 111