Solved

How to define a property in the user control?

Posted on 2006-06-20
3
605 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
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 shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

752 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