Re: User control can't access the parent page's public properties

The issue is that when you access this.Page through the control you are getting an instance of the base Page object, which does not have a DataListSelectedIndex property. You first need to cast the page object to the actual page you are on. Take a look in
your pages codebehind, the class name is the type of page you want. You can then access the property from your page by doing:

((CODEBEHINDCLASSNAME)this.Page).DataListSelectedIndex = VALUE;

This is bad practice though as it ties your control to a specific page. You can get round this in two ways. Firstly you could write a simple interface: