Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > using properties

Reply
Thread Tools

using properties

 
 
Jon Paal
Guest
Posts: n/a
 
      03-14-2006
the primary use of a custom control is achieved with :

"<cc1:myCustomControl id="CustomControl1" runat="server" />"

properties are assigned programatically with a call to "LoadProperties(CustomControl1)"

Sub LoadProperties(oThis)
othis.Chart_align = "center"
...
End Sub


and this part works.


When I create a second instance of my custom crontrol, and try to access a single function of that control, it tells me the
properties don't exist.

how can I access a single function of my custom server control to return an interim value ?


.............. code start ...

'create a new instance of control
'-----------------------------------
Dim oDisplay as myCustomControl = New myCustomControl
call LoadProperties(oDisplay )

'create new arraylist
'--------------------------
Dim myArrayList As New ArrayList()

'populate arraylist
'-----------------------
myArrayList = oDisplay.buildarraylist()

............. end code .....

This fails because it's not accepting the properties, but it does accept them on the first instance above ??

------------- error msg -----------------
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 1415: writer.AddAttribute("align", Chart_align.ToString() )






 
Reply With Quote
 
 
 
 
CaffieneRush@gmail.com
Guest
Posts: n/a
 
      03-16-2006
Just a shot in the dark but what happens when you pass in the control
to LoadProperties() *by reference*.

 
Reply With Quote
 
 
 
 
Jon Paal
Guest
Posts: n/a
 
      03-17-2006
found my problem, it was in the sequence of properties being passed.

thanks for replying.


<(E-Mail Removed)> wrote in message news:(E-Mail Removed) ups.com...
> Just a shot in the dark but what happens when you pass in the control
> to LoadProperties() *by reference*.
>



 
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
Not able to copy all properties using properties.putAll() method. Sonal Java 3 12-07-2007 03:08 AM
CompositeControls: ViewState properties w/ Mapped properties probl =?Utf-8?B?Q2hyaXN0b3BoZSBQZWlsbGV0?= ASP .Net 1 01-19-2006 09:19 AM
Making Custom Control Properties Visible in Visual Studio's Properties Palette Nathan Sokalski ASP .Net 0 10-17-2005 02:05 AM
Re: C++ properties Library Created (was Binding together Properties of Objects) Victor Porton C++ 1 08-29-2004 08:02 PM
Problems parsing when Properties.dtd.properties Kent Lichty Java 0 04-16-2004 03:08 PM



Advertisments