Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > webparts (VB.NET)

Reply
Thread Tools

webparts (VB.NET)

 
 
ton
Guest
Posts: n/a
 
      03-31-2010
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 aspropertygird 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

 
Reply With Quote
 
 
 
 
Gregory A. Beamer
Guest
Posts: n/a
 
      03-31-2010


"ton" <(E-Mail Removed)> wrote in message
news:86b5$4bb35d2e$541ee3ce$(E-Mail Removed)1.nb .home.nl...
> 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 aspropertygird 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/libr...ffice.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! |
************************************************

 
Reply With Quote
 
 
 
 
ton
Guest
Posts: n/a
 
      03-31-2010
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




"Gregory A. Beamer" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
>
>
> "ton" <(E-Mail Removed)> wrote in message
> news:86b5$4bb35d2e$541ee3ce$(E-Mail Removed)1.nb .home.nl...
>> 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 aspropertygird 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/libr...ffice.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! |
> ************************************************


 
Reply With Quote
 
ton
Guest
Posts: n/a
 
      04-01-2010
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.





"ton" <(E-Mail Removed)> schreef in bericht
news:15d37$4bb38ac0$541ee3ce$(E-Mail Removed)1.n b.home.nl...
> 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
>
>
>
>
> "Gregory A. Beamer" <(E-Mail Removed)> schreef in bericht
> news:(E-Mail Removed)...
>>
>>
>> "ton" <(E-Mail Removed)> wrote in message
>> news:86b5$4bb35d2e$541ee3ce$(E-Mail Removed)1.nb .home.nl...
>>> 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 aspropertygird 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/libr...ffice.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! |
>> ************************************************

>


 
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
ASP.Net Framework2 and webparts ALI-R ASP .Net 1 03-16-2005 01:11 PM
Webparts - in asp.net 1.1? VB Programmer ASP .Net 1 10-23-2004 02:26 PM
webparts & sqlclientpermission António Pinho ASP .Net 4 04-19-2004 10:47 AM
Sharepoint Webparts Session and Application Variables Tom ASP .Net 0 01-23-2004 09:31 PM
SharePoint WebParts in ASPX Web App George Durzi ASP .Net 0 11-14-2003 06:33 PM



Advertisments