D DaveF Jan 11, 2005 #1 I have a textbox in a user control that a put in a aspx page. How do I get a referance to that textbox from my aspx page?
I have a textbox in a user control that a put in a aspx page. How do I get a referance to that textbox from my aspx page?
K Karl Seguin Jan 11, 2005 #2 Check out http://openmymind.net/communication/index.html it talks about some different strategies...the general idea is to expose the control (or atleast it's Text property) as a property of the control which the page can then access. Karl
Check out http://openmymind.net/communication/index.html it talks about some different strategies...the general idea is to expose the control (or atleast it's Text property) as a property of the control which the page can then access. Karl
C Curt_C [MVP] Jan 11, 2005 #3 foreach (RepeaterItem ri in this.rptrCustomFields.Items) { TextBox txtRepeater = (TextBox)ri.FindControl("txtRepeater"); }
foreach (RepeaterItem ri in this.rptrCustomFields.Items) { TextBox txtRepeater = (TextBox)ri.FindControl("txtRepeater"); }
K Karl Seguin Jan 11, 2005 #4 He didn't say anything about repeaters...though obviously the same could be applied to a user control (though it's a little different) Karl
He didn't say anything about repeaters...though obviously the same could be applied to a user control (though it's a little different) Karl
C Curt_C [MVP] Jan 11, 2005 #5 DOH..... My bad, misread it. Otherwise just put the code for it IN the code-behind of the repeater. I use the same one you mentioned, expose it as public. -- Curt Christianson Site & Scripts: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
DOH..... My bad, misread it. Otherwise just put the code for it IN the code-behind of the repeater. I use the same one you mentioned, expose it as public. -- Curt Christianson Site & Scripts: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com