Solved

using usercontrol

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 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