webparts (VB.NET)

  • Thread starter Thread starter ton
  • Start date Start date
T

ton

Hi,

I want to use webparts. I'm develoing a control to use as webpart but I want
to let users customize some properties of the webpart. How can this be done
in VB. I've allready added a asp:propertygird conmtrol to the editor zone,
but what next?

How can I set the properties? (In the usercontrol I just created)

Isn't there a standerd tamplate which can be added as a new Item?

Thanx


Ton
 
ton said:
Hi,

I want to use webparts. I'm develoing a control to use as webpart but I
want to let users customize some properties of the webpart. How can this
be done in VB. I've allready added a asp:propertygird conmtrol to the
editor zone, but what next?

How can I set the properties? (In the usercontrol I just created)

Do you mean setting properties prior to render or as the application is
running? If you truly mean properties, like in a class, this might help:

http://msdn.microsoft.com/en-us/library/dd584174(office.11).aspx

If you are talking client side only, run time behavior, it gets trickier, of
course and there are two basic avenues of attack, depending on what you are
doing. They are JavaScript and CSS.

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************
 
Thanx ! It worked, I'm allmost there:

<CategoryAttribute("Application"), _
DefaultValueAttribute("Titel"), _
WebParts.WebBrowsable(True), _
WebParts.Personalizable(PersonalizationScope.User), _
WebDisplayName("geef titel")> _
Public Property Titel() As String
Get
Return _title
End Get
Set(ByVal Value As String)
_title = Value
End Set
End Property

Now I have to see a dropdownlist where the list is based upon a query from a
sql database. The user has to choose 1 item and this value should be stored
in the webpart. The example above worked because the value is stored and
after a new visit the stored value is taken. So far so good.....

Thanx

Ton
 
I think I've solved this problem

I add a dropdownlist to the usercontrol.
I let the user pick one from a list
and save the value in the database with: control.parent.clientid as a key
this is different for any webpart which uses this usercontrol.

User do not have to use the webpart Edit mode to modify the choosen value.
 
Back
Top