Solved

How to define a property in the user control?

Posted on 2006-06-20
3
604 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 Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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