Hi Nicholas,
I've never actually accessed controls directly, but when accessing a
control/variable in a user control, you have to reference the control first...
yourcontrol1.MyTextBox.Text
If this is happening in the Code-Behind, you also need to add a reference to
your user control in the code-behind
private YourControl yourcontol1;
where YourControl is the TagName in your Register directive, and
yourcontrol1 is the ID of the instance of the control you created.
I hope this helps! Any probs post back.
Cheers
dhnriverside
"nicholas" wrote:
I have an aspx page.
On that page there is a user control (ascx-file) that contains user-login
info.
How can I access variables defined on the ascx-page (usercontrol) from
within my aspx-page.
I tried for ex. to put a textbox (MyTextBox) in the user control.
But when, on my aspx-page I try to get the value of that textbox
(MyTextBox.text) I get an error that says that MyTextBox is not defined.
THX for helping me!