Microsoft Content Management Server - Changing posting name when creating

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > May 2006 > Changing posting name when creating





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Changing posting name when creating
Sergio Navarro (MCAD Spain)

2006-05-23, 1:15 pm

Hello,

I need to change the posting name when creating it.

I try to change it in CmsPonting_PropertyChanged event, but it raises an
exception.

It's posible to change the name?

PS: Sorry for my poor English
Stefan [MSFT]

2006-05-23, 1:15 pm

Hi Sergio,

you need to do this in the CmsPosting_PropertyChangingEvent.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Sergio Navarro (MCAD Spain)"
<SergioNavarroMCADSpain@discussions.microsoft.com> wrote in message
news:4EFE5DC2-FC59-477D-8578-602FBF158DBD@microsoft.com...
> Hello,
>
> I need to change the posting name when creating it.
>
> I try to change it in CmsPonting_PropertyChanged event, but it raises an
> exception.
>
> It's posible to change the name?
>
> PS: Sorry for my poor English



Sergio Navarro (MCAD Spain)

2006-05-24, 7:15 am

Thanks Stefan,

it's working with CmsPosting_PropertyChangingEvent.

The name must be set in e.PropertyValue, not in Posting.name that raises an
exception.

Here is my code, perhaps anybody wants see it:


Sub CmsPosting_PropertyChanging(ByVal sender As Object, ByVal e As
PropertyChangingEventArgs)

Try

' Dim elPost As Posting = CType(e.Target, Posting)
' elPost.name= "name" This isn't working


Dim nombrePropiedad As String = e.PropertyName
Dim valorPropiedad As String = CType(e.PropertyValue, String)

e.PropertyValue = valorPropiedad & "_sufijo"

Catch ex As Exception


End Try

End Sub


"Stefan [MSFT]" wrote:

> Hi Sergio,
>
> you need to do this in the CmsPosting_PropertyChangingEvent.
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
> Check out the new book as well: Advanced MCMS development:
> http://tinyurl.com/8ugwj
> ----------------------
>
>
> "Sergio Navarro (MCAD Spain)"
> <SergioNavarroMCADSpain@discussions.microsoft.com> wrote in message
> news:4EFE5DC2-FC59-477D-8578-602FBF158DBD@microsoft.com...
>
>
>

Stefan [MSFT]

2006-05-24, 7:15 pm

Yes, that is the correct approach.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Sergio Navarro (MCAD Spain)"
<SergioNavarroMCADSpain@discussions.microsoft.com> wrote in message
news:864D8356-AC7A-4DB3-8EFC-0371BBA5833B@microsoft.com...[vbcol=seagreen]
> Thanks Stefan,
>
> it's working with CmsPosting_PropertyChangingEvent.
>
> The name must be set in e.PropertyValue, not in Posting.name that raises
> an
> exception.
>
> Here is my code, perhaps anybody wants see it:
>
>
> Sub CmsPosting_PropertyChanging(ByVal sender As Object, ByVal e As
> PropertyChangingEventArgs)
>
> Try
>
> ' Dim elPost As Posting = CType(e.Target, Posting)
> ' elPost.name= "name" This isn't working
>
>
> Dim nombrePropiedad As String = e.PropertyName
> Dim valorPropiedad As String = CType(e.PropertyValue, String)
>
> e.PropertyValue = valorPropiedad & "_sufijo"
>
> Catch ex As Exception
>
>
> End Try
>
> End Sub
>
>
> "Stefan [MSFT]" wrote:
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com