Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using interfaces for sharing properties Part II...

Reply
Thread Tools

Using interfaces for sharing properties Part II...

 
 
Karl Seguin
Guest
Posts: n/a
 
      01-25-2005
thanks... and glad it's mosty working..

how you declare it shouldn't matter. however, you might misunderstand (a
sign that my method is ambiguous (and it is)). I'm not doing:

protected controName as controlName

I'm doing

protected instancceId as controlName

if you look at the aspx file you'll see I have:

<uc1:GetVariables id=getVariables runat="server"></uc1:GetVariables>

in page.aspx you can see that I have id=getVariables had I done
id=uc_GetVariables I would then end up with the following declaration:

protected uc_GetVariables as GetVariables

It was confusing of me to give control the same ID as the class name...my
guess is that you didn't actually have a control named uc_GetVariables in
the aspx page...hence you didn't have an instance...hence the exception..

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


"darrel" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> > Darrel,
> > I've attached a very simple and basic working example. From what you've
> > given me everything looks ok...see if you can't spot the difference

> between
> > what I'm sending and what you have. Lemme know what you find out.

>
> Wow. Spent about an hour going through your example and comparing it line

by
> line. I had a few errors on my part here and there.
>
> One last question...which I don't think is directly related to interfaces,
> is this:
>
> I was declaring my Usercontrols like this:
>
> protected UC_controlName as controlName
>
> while you were using:
>
> protected controlName as controlName
>
> My way would result in ' Object reference not set to an instance of an
> object.' errors.
>
> Anyways, I got it working, and I understand about 90% of it, so I've come

a
> long way with this. Thank you! I owe you a beer! (or two!)
>
> BTW, I've started reading through some of your other articles on your

site.
> That's a great resource!
>
> -Darrel
>
>



 
Reply With Quote
 
 
 
 
darrel
Guest
Posts: n/a
 
      01-25-2005
> protected instancceId as controlName

(me slaps forehead)

ARGH! Of course! I wasn't connecting it to the UC ID declared in the ASPX
page. I normally preface all my control names with what they are (textbox_,
uc_, label_, etc.) and I didn't this time as I was just throwing things
together to test with.

That's another headache gone ;o)

Thanks again, Karl!

-Darrel


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Serializing objects to JSON with properties that return interfaces Ra Carter ASP .Net 1 03-17-2010 02:36 AM
Web Part INterfaces SSRS Deep INtegration and Sharepoint ezeget.com ASP .Net Web Controls 4 10-25-2007 09:04 AM
Anyway to extract properties and interfaces provided by any object. iceColdFire C++ 4 05-17-2005 09:02 AM
Need help using interfaces to exchange properties between pages darrel ASP .Net 0 01-21-2005 07:41 PM
ATM Interfaces Qos Properties Thorsten Maier Cisco 2 12-19-2004 10:38 PM



Advertisments