Solved

How to define a property in the user control?

Posted on 2006-06-20
3
594 Views
Last Modified: 2006-11-18
I have created a user control: myUserControl.ascx. A property is defined as follows:

private string target;

    public String Target
    {
        get { return target; }
        set { target = value;}
    }

myUserControl is registered with the master page:
<%@ Register Src="../UserControls/myUserControl.ascx" TagName="myUserControl" TagPrefix="uc11" %>

My intention is to set the property Target externally. But when I click on the user control on the master page, it shows nothing on the property page. Anyone can offer some ideas?
0
Comment
Question by:chuang4630
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
kGenius earned 500 total points
ID: 16942253
0
 
LVL 1

Author Comment

by:chuang4630
ID: 16943837
This link provides useful informaton for exposing the property in the designer.

Actually, developer can set the property in the aspx while declaring the user control as follows:

<uc11:myUserControl ID="myUserControl1" runat="server" Target="myTestTarget.aspx" />


0
 
LVL 7

Expert Comment

by:kGenius
ID: 16944514
as you say. :-)

kGenius
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now