Hi Mick,
Check your code behind, where the controls are defined as protected members
of your class. You probably need to add a line that declares your control
in your source code.
In C# this would look something like;
protected System.Web.UI.WebControls.Table tblRequest;
protected MyControl MyControl1;
That will make it possible to access your control's properties and methods
from your source.
Also, I'm fairly certain that you will only be able to access properties and
methods that you've defined. I don't recall a way to directly access the
embedded controls, though there might be a Controls collection that serves
this purpose. Otherwise you'll need to define properties and methods in
your User Control that provide access to the specific properties and methods
you want to expose. E.g.
public string Text1
{
get { return TextBox1.Text; }
set { TextBox1.Text = value; }
}
public string Text2
{
get { return TextBox2.Text; }
set { TextBox2.Text = value; }
}
And so on...
/// M
"Mick" <sa****@libertysurf.fr> wrote in message
news:41**********************@news.free.fr...
Hi,
Dragging & Dropping my ascx control in my aspx page, I just wanna know how
I can access its properties when validating the form ?
The control is composed of 4 controls (2 txtbox and 2 dropdown : Address,
ZipCode, Country & City).
In fact, when, in my code, I try "this.MyControlId".... it does not exist.
Thks for help.