Click here to Skip to main content
15,899,679 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionInteresting problem - Interaction between controls on a page and controls embeded within a user control Pin
Tina P26-Sep-08 0:45
Tina P26-Sep-08 0:45 
AnswerRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
droth1726-Sep-08 2:28
droth1726-Sep-08 2:28 
AnswerRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
t7bros26-Sep-08 4:00
t7bros26-Sep-08 4:00 
GeneralRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
Tina P26-Sep-08 16:20
Tina P26-Sep-08 16:20 
GeneralRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
AlexeiXX326-Sep-08 17:14
AlexeiXX326-Sep-08 17:14 
GeneralRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
Tina P26-Sep-08 21:04
Tina P26-Sep-08 21:04 
GeneralRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
AlexeiXX327-Sep-08 10:27
AlexeiXX327-Sep-08 10:27 
GeneralRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
Tina P27-Sep-08 11:45
Tina P27-Sep-08 11:45 
Hey Alexei, thanks for the response.

The answer to the question: Whats the name of the control, installationDateTextBox or _installationDateTextBox??" is:

- Assuming that by the name of the control, you are actually referring to the ID of the text box control, Yes it is "_installationDateTextBox" as shown below.
<asp:textbox id="_installationDateTextBox" runat="server" width="91px" xmlns:asp="#unknown"></asp:textbox>


As far as the code behind of this ascx file, all I'm doing there is setting the text property of this control.

_installationDateTextBox.Text = DataAccessLayer.DataSource.getReaderByIdForInstall(assemblyID);

The assemblyId is being retrieved from the database on the apsx page itself, so I'm passing it to the control by using a public property.

The weird thing is that when I try to find a control which is located on the page itself (aspx file) by doing something like the following:
Control temp = FindControl("InfoLinkButton");

It works fine, you can see the temp variable here with the actual LinkButton control and all its properties in the debugger. But when I replace the InfoLinkButton control with _installationDateTextBox (which is located on the ascx file) then the temp would have Null, meaning its not found??? That's just bizarre! Here's the code:

Control temp1 = myUserControl.FindControl("_installationDateTextBox"); (temp1 is Null when this line execute)

What am I doing wrong here Frown | :(

Tina
GeneralRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
AlexeiXX327-Sep-08 12:54
AlexeiXX327-Sep-08 12:54 
GeneralRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
Tina P27-Sep-08 14:10
Tina P27-Sep-08 14:10 
GeneralRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control [modified] Pin
AlexeiXX327-Sep-08 16:55
AlexeiXX327-Sep-08 16:55 
GeneralRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
Tina P28-Sep-08 0:28
Tina P28-Sep-08 0:28 
GeneralRe: Interesting problem - Interaction between controls on a page and controls embeded within a user control Pin
AlexeiXX328-Sep-08 5:51
AlexeiXX328-Sep-08 5:51 
QuestionQuestion regarding formatting/ displaying data in a drop down list Pin
Tina P26-Sep-08 0:41
Tina P26-Sep-08 0:41 
AnswerRe: Question regarding formatting/ displaying data in a drop down list Pin
NeverHeardOfMe26-Sep-08 0:50
NeverHeardOfMe26-Sep-08 0:50 
GeneralRe: Question regarding formatting/ displaying data in a drop down list Pin
Tina P26-Sep-08 21:05
Tina P26-Sep-08 21:05 
Questionserver.tranfer path error Pin
imranafsari26-Sep-08 0:26
imranafsari26-Sep-08 0:26 
AnswerRe: server.tranfer path error Pin
droth1726-Sep-08 1:54
droth1726-Sep-08 1:54 
QuestionCheck checkbox values in checkboxlist from database help (c#) Pin
AdamskiR26-Sep-08 0:11
AdamskiR26-Sep-08 0:11 
QuestionGet file name out of path Pin
varsh1226-Sep-08 0:01
varsh1226-Sep-08 0:01 
AnswerRe: Get file name out of path Pin
NeverHeardOfMe26-Sep-08 0:07
NeverHeardOfMe26-Sep-08 0:07 
GeneralRe: Get file name out of path Pin
J4amieC26-Sep-08 0:35
J4amieC26-Sep-08 0:35 
GeneralRe: Get file name out of path Pin
NeverHeardOfMe26-Sep-08 0:45
NeverHeardOfMe26-Sep-08 0:45 
QuestionReplace function is not working on ASP Pin
Amit Battan Ror25-Sep-08 23:00
Amit Battan Ror25-Sep-08 23:00 
AnswerRe: Replace function is not working on ASP Pin
NeverHeardOfMe25-Sep-08 23:28
NeverHeardOfMe25-Sep-08 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.