User Control Property Problem, help!!!!!!

  • Thread starter Thread starter Astroboy
  • Start date Start date
A

Astroboy

I have create a user control and set
public property PageTitle as string
get
return _pageTitle
end get
set(value as string)
_pageTitle=value
end set
end property
somehow it's doesn't show up on the property page(F4) and also when I go to
behind coding, it's doesn't have usercontrol listed, so cannot perform
assignment like
usercontrol1.pagetitle="hello"

Is it not support in ASP.NET???
 
Hi Astroboy,

When you create user controls all the properties that are created ar NOT
listed in the Property Window (F4)
also when you drag and drop the web user control on your page the VS doesn't
create an object in your code behind - you have to create it manually

Regards
Martin
 
Dear Astroboy,

In the property page where you define the usercontrol's tag, just give as follows:-

<uc1:myusercontrol id="myusercontrol1" runat="server" PageTitle="put your title here"></uc1:myusercontrol>

That should work.

Thanks.
 
Back
Top