Solved

using usercontrol

Posted on 2004-09-02
4
187 Views
Last Modified: 2010-04-23

hi

      i have a usercontrol which has public property description. how can i access that property in .aspx page.

Initially i have dragged and dropped the user control onto .aspx page.

when i am writing code in .aspx.vb file as

                Label1.Text = Bccbc1.Description (Bccbc1 is the usercontrol and description is the property of it)

it giving me error as " Reference to a non-shared member requires an object reference."

any help with this.

thanks
     
0
Comment
Question by:srinivas_vemla
4 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 25 total points
ID: 11964802
It look likes the usercontrol wasn't instanciated

dim bccbc1 as NEW yourusercontrol

does your usercontrol

include this


Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub
0
 
LVL 10

Assisted Solution

by:123654789987
123654789987 earned 25 total points
ID: 11970739
Have u put the following on top of your inheriting asmx page

<%@ control inherits = "YourUserControl" src = "YourUserControl.cs" %>
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 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

22 Experts available now in Live!

Get 1:1 Help Now