[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 459
  • Last Modified:

asp.net - vb.net - autocomplete with web usercontrol.

I am trying to create an autocomplete for a textbox in  my vb.net app.

When I take an existing auto complete web suer control...it works fine...but doesnt query the data correctly...

so I took and played with it to get the right query against the db....but I get this error:

 
Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).



Line 1:  
Line 2:  Partial Class Control_AutoSuggestDirectAccounts
Line 3:  
Line 4:      Partial Class Control_AutoDirectAccounts

this is in the acsx.vb page....


compiler output:
C:\Data \Web Sites\TestSite\Control\AutoSuggestDirectAccounts.ascx.vb(9) : error BC30469: Reference to a non-shared member requires an object reference.

                Return (txtName.Width)
                        ~~~~~~~      
C:\Data \Web Sites\TestSite\Control\AutoSuggestDirectAccounts.ascx.vb(12) : error BC30469: Reference to a non-shared member requires an object reference.

                txtName.Width = Value
                ~~~~~~~              
C:\Data \Web Sites\TestSite\Control\AutoSuggestDirectAccounts.ascx.vb(18) : error BC30469: Reference to a non-shared member requires an object reference.

                Return (txtName.Enabled)
                        ~~~~~~~        
C:\Data \Web Sites\TestSite\Control\AutoSuggestDirectAccounts.ascx.vb(21) : error BC30469: Reference to a non-shared member requires an object reference.

                txtName.Enabled = Value
                ~~~~~~~                
C:\Data \Web Sites\TestSite\Control\AutoSuggestDirectAccounts.ascx.vb(27) : error BC30469: Reference to a non-shared member requires an object reference.

                Return (txtName.Text)
                        ~~~~~~~      
C:\Data \Web Sites\TestSite\Control\AutoSuggestDirectAccounts.ascx.vb(30) : error BC30469: Reference to a non-shared member requires an object reference.

                txtName.Text = Value
                ~~~~~~~            
C:\Data \Web Sites\TestSite\Control\AutoSuggestDirectAccounts.ascx.vb(37) : error BC30469: Reference to a non-shared member requires an object reference.

                    Return _productID.Value
                           ~~~~~~~~~~      
C:\Data \Web Sites\TestSite\Control\AutoSuggestDirectAccounts.ascx.vb(44) : error BC30469: Reference to a non-shared member requires an object reference.


 
0
GlobaLevel
Asked:
GlobaLevel
  • 2
  • 2
1 Solution
 
strickddCommented:
I believe a majority of your problem stems from you having a partial class inside a partial class.
0
 
GlobaLevelAuthor Commented:
okay thanks for your help....that fixed the bugs...however...during runtime, I type into the box and I see it posting back to the textbox, but no data returns even though I know I typing in something that is found in the database.  I am working form Surround SourceControl.....so it makes it difficult to step through the code...
0
 
strickddCommented:
If you are not using it, I recommend using Firebug. It will allow you to see the requests and responses which will help immensely in deubgging this issue.
0
 
GlobaLevelAuthor Commented:
have you ever used a .acsx file to web control for this? is it possible?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now