?
Solved

using usercontrol

Posted on 2004-09-02
4
Medium Priority
?
194 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
[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
4 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 100 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 100 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

Technology Partners: 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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
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