Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
findcontrol
- Page 1
FindControl not finding my iframe: Object ref not set to an instance of an object
Programming
Software Development
14 Years Ago
by lgriess
…) { //frame1 = (HtmlGenericControl)this.
FindControl
("frame1"); HtmlControl frame1 = (HtmlControl)this.
FindControl
("frame1"); frame1.Attributes["…The line of code: HtmlControl frame1 = (HtmlControl)this.
FindControl
("frame1"); returns a null object for frame1. …
Findcontrol issue
Programming
Web Development
16 Years Ago
by WinginSue
…using an item template and the
FindControl
method. I am using Dreamweaver to…dgItem in dgsvcPacks.Items ckSelected = dgsvcPacks.
FindControl
("ckUpdate") if ckSelected.Checked then… strSelected = CType(dgsvcPacks.
FindControl
("name"),Label).Text strSelected = …
FindControl not working in RowDatabound
Programming
Software Development
13 Years Ago
by chenschel
… Then Dim dp As DropDownList = CType(e.Row.Cells(4).
FindControl
("ddRoles"), DropDownList) Dim dt As DataTable = LoadRoles() Dim…;: [CODE] Dim dp As DropDownList = CType(e.Row.Cells(4).
FindControl
("ddRoles"), DropDownList) [/CODE] So I think error is…
Findcontrol not working in rowdatabound
Programming
Web Development
13 Years Ago
by chenschel
… Then Dim dp As DropDownList = CType(e.Row.Cells(4).
FindControl
("ddRoles"), DropDownList) Dim dt As DataTable = LoadRoles() Dim…;: [CODE] Dim dp As DropDownList = CType(e.Row.Cells(4).
FindControl
("ddRoles"), DropDownList [/CODE] So I think error is…
Findcontrol not finding textbox in Formview
Programming
Web Development
11 Years Ago
by EddiRae
… is in Insert mode before I do the
FindControl
. Here is my code. Dim tbCallBackDate As …" Then GoBack() End If tbCallBackDate = fvMailout.Row.
FindControl
("CallBackDateTextBox") If IsDate(tbCallBackDate.Text) Then If …
Re: Findcontrol issue
Programming
Web Development
16 Years Ago
by greeny_1984
hi, try like this [code] For Each dgItem in dgsvcPacks.Items ckSelected = dgItem.
FindControl
("ckUpdate") as checkbox if ckSelected.Checked then strSelected = CType(dgItem.
FindControl
("name"),Label).Text strSelected = strselected & "<br>" end if [/code]
Re: FindControl not finding my iframe: Object ref not set to an instance of an object
Programming
Software Development
14 Years Ago
by Geekitygeek
… your control is hosted in a nested naming container then
FindControl
might not work. Also, have you tried debugging to check…
Re: FindControl not finding my iframe: Object ref not set to an instance of an object
Programming
Software Development
14 Years Ago
by Geekitygeek
… searches each container looking for the control because the default
FindControl
only searches the top level. Thats why setting the div…
Re: FindControl not finding my iframe: Object ref not set to an instance of an object
Programming
Software Development
14 Years Ago
by lgriess
… would have known. Thanks for all your posts to my
FindControl
problem, but I think guys, I've been on a…
Re: Findcontrol issue
Programming
Web Development
16 Years Ago
by achristov
In general set the @Page attribute trace="true" to locate the control. Then you'll easily figure out how to "FilndControl()" it. Read MSDN on
FindControl
() also. This should be enough!
Re: Findcontrol issue
Programming
Web Development
16 Years Ago
by CornerAnalyst
comment out [icode]Dim ckSelected as System.Web.UI.WebControls.CheckBox[/icode] and within your loop [code]For Each dgItem As GridViewRow in dgsvcPacks.Rows Dim cb As CheckBox = row.
FindControl
("ckUpdate")[/code]
Re: Findcontrol issue
Programming
Web Development
16 Years Ago
by CornerAnalyst
Make that: comment out [icode]Dim ckSelected as System.Web.UI.WebControls.CheckBox[/icode] and within your loop [code]For Each dgItem As GridViewRow in dgsvcPacks.Rows Dim cb As CheckBox = dgItem .
FindControl
("ckUpdate")[/code]
Re: findControl in a Repeater control
Programming
Web Development
13 Years Ago
by Atul Dhiman
…TextBox write this string str1 = ((TextBox)e.Item.
FindControl
("TextBox1")).Text; and for label write this …((Label)e.Item.
FindControl
("Label1")).Visible = true; for link write …this ((LinkButton)e.Item.
FindControl
("LinkEdit")).Visible = true; use it it will…
Re: Findcontrol not working in rowdatabound
Programming
Web Development
13 Years Ago
by nakor77
Do a check along the lines of [CODE] if e.row.rowindex = gridview.editindex e.row.
findcontrol
(control name) end if [/CODE] That syntax isn't correct, but the logic should be as was said above, if the current row isn't in edit mode then the drop down won't exist for that row and you'll get that error
Findcontrol in gridview inside repeater inside another repeater
Programming
Web Development
13 Years Ago
by icedome
… tryed something like this: [CODE]DropDownList ddlPersons = (DropDownList)e.item.
FindControl
("ddlPersons");[/CODE] and also even this: [CODE]DropDownList… ddlPersons = (DropDownList)this.Page.
FindControl
("ddlPersons");[/CODE] But no luck with both ways…
Re: Findcontrol in gridview inside repeater inside another repeater
Programming
Web Development
13 Years Ago
by icedome
Well... my first post has just been solved... I've forgot to include the row in the
findcontrol
... the code should be like this: [CODE]DropDownList ddlPersons = (DropDownList)gridview1.Rows[0].
FindControl
("ddlPersons"); // of course, that the number inside the Rows[] is the row index [/CODE] Hope that this could be useful to someone :)
findControl in a Repeater control
Programming
Web Development
15 Years Ago
by draxous
[CODE] LinkButton lnkBtnRemove = (LinkButton)Repeater1.Items[0].
FindControl
("lnkRemove"); lnkBtnRemove.Visible = false;[/CODE] i used above …
Re: findControl in a Repeater control
Programming
Web Development
15 Years Ago
by Seten
[QUOTE=draxous;1062263][CODE] LinkButton lnkBtnRemove = (LinkButton)Repeater1.Items[0].
FindControl
("lnkRemove"); lnkBtnRemove.Visible = false;[/CODE] i used above …
Cannot use Page.FindControl in button event handler?
Programming
Web Development
16 Years Ago
by wll6568
… void btnGo_OnClick(object sender, EventArgs e) 2 { 3 ((TextBox)Page.
FindControl
("txb" + strColumn)).Text 4 } but that throws an…
Re: Cannot use Page.FindControl in button event handler?
Programming
Web Development
16 Years Ago
by greeny_1984
hi, there are few flaws in u r code.did u declare strcolumn [code] protected void btnGo_OnClick(object sender, EventArgs e) 2 { 3 ((TextBox)Page.
FindControl
("txb" + strColumn)).Text [B];[/B] 4 } [/code]
Problem with FormView.FindControl
Programming
Web Development
15 Years Ago
by Ana D.
…=VB.NET]Protected Sub BindFormView() Dim myLabel As Label = myFormView.
FindControl
("myLabel") myLabel.Text = AnotherLabel.Text End Sub [/CODE…
Re: Problem with FormView.FindControl
Programming
Web Development
15 Years Ago
by Ramesh S
… bind any data source to the FormView control. Therefore myFormView.
FindControl
("myLabel") returns always nothing. Try after data binding…
Repeater FindControl with error "Object reference not set to an instance of an objec"
Programming
Web Development
15 Years Ago
by boycuoi
… Dim Img As ImageButton = New ImageButton Img = DirectCast(e.Item.
FindControl
("DltImg"), ImageButton) If Check = "admin" Then…
Problem using FindControl to locate TextBox in dynamically created Template Field???
Programming
Web Development
14 Years Ago
by vt10000
… textbox controls. I've tried using the current row's
FindControl
method and specifying the name of the textbox field, I…
Re: FindControl not finding my iframe: Object ref not set to an instance of an object
Programming
Software Development
14 Years Ago
by PierlucSS
I tried with your code, and it worked, I've been able to see the innertext of the iframe. I realised that it wont work, if iframe parent's control are runat="server". Which means This would work, [CODE] <div> <iframe id="test" runat="server"></iframe> </div>[/CODE] but this wouldn't [CODE] &…
Re: FindControl not finding my iframe: Object ref not set to an instance of an object
Programming
Software Development
14 Years Ago
by Geekitygeek
Not necesarily :) You might not have used it this tiem, but there will come a time when you need to do something similar in the future and you'll know what to look for. If just one person learns one thing then it's not a waste of time.
Re: Findcontrol issue
Programming
Web Development
16 Years Ago
by WinginSue
Thanks.. you helped me realize I goofed and was doing the grid instead of the item. I'm almost there. I just realized I need templateitems for the rest of the columns as there is no "ID" field for the boundcolumn. The whole thing works now. YIPPEE! Thank you so much!
Re: Findcontrol issue
Programming
Web Development
16 Years Ago
by greeny_1984
hi, If you solved your issue,i suggest to mark this thread as solved as it saves time for fellow posters to concentrate on other posts.
Re: Findcontrol not working in rowdatabound
Programming
Web Development
13 Years Ago
by croker10
It has been a bit since I've done something similar to this, but the thought that comes to mind is that ddRoles is inside an edit item template. I believe that this is only rendered when the item is being selected for edit. So any reference to that object would result in a null, as the template has not been rendered. Anyway, just a …
Re: Findcontrol not working in rowdatabound
Programming
Web Development
13 Years Ago
by chenschel
Ok - thanks will check into that
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC