If the property is the same as the name of the dropdownlist , the compiler
is going to complain.
Your [PageName].aspx.designer.cs class will have the dropdownlist defined,
if you want to expose the ddl as a property simply
use a different name
Hope this helps!
Swanand
--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)
http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"theWizard1" <(E-Mail Removed)> wrote in message
news:301E82A3-10F3-4F17-8327-(E-Mail Removed)...
> Using Visual Studio.Net 2005, Asp.Net 2.0, and trying to use technique
> shown
> in the Programming Asp.Net 3rd Edition by O'Reily, page 257.
>
> On the first page, this would become the previous page, I have 2
> dropdowns.
> According to their technique, I should create a public property on my
> previous page for these 2 dropdowns, and then I would would be able to get
> their settings on the target aspx page.
>
> I have added the 2 properties on the previous page:
>
> public DropDownList ddlMonth
> {
> get { return ddlMonth; }
> }
>
> public DropDownList ddlYear
> {
> get { return ddlYear; }
> }
>
> However, I get an errors showing:
> The type "gives me my page name" already contains a definition for
> ddlMonth.
> The type "gives me my page name" already contains a definition for
> ddlYear.
>
> I would really like to use this technique. Please help.
>
>