user controls help

G

Guest

hey all,

i have a datalist that i'd like to make a user control. if i do that can i
control if i want the datalist property RepeatDirection to be Vertical or
Horizontal from the client design page?

thanks,
rodchar
 
G

Guest

Expose it as a property of your UserControl.

Ex.

public class MyUserControl : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls DataList myDataList;

public RepeatDirection RepeatDirection
{
get{return myDataList.RepeatDirection;}
set{myDataList.RepeatDirection = value;}
}
}
 
G

Guest

Thanks.

Demetri said:
Expose it as a property of your UserControl.

Ex.

public class MyUserControl : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls DataList myDataList;

public RepeatDirection RepeatDirection
{
get{return myDataList.RepeatDirection;}
set{myDataList.RepeatDirection = value;}
}
}
 
G

Guest

thank you very much. this helped.

Demetri said:
Expose it as a property of your UserControl.

Ex.

public class MyUserControl : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls DataList myDataList;

public RepeatDirection RepeatDirection
{
get{return myDataList.RepeatDirection;}
set{myDataList.RepeatDirection = value;}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,610
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top