Solved

using usercontrol

Posted on 2004-09-02
4
186 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

21 Experts available now in Live!

Get 1:1 Help Now