RE: How do I set a custom property attribute when creatingt a new post
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > RE: How do I set a custom property attribute when creatingt a new post




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    RE: How do I set a custom property attribute when creatingt a new post  
Randall


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-29-04 10:52 PM

Eric,

How did you set the custom properties on the CmsPosting_Changed event handle
r?
Can you please share the code?

I appreciate your help.

Regards,
Randall


"eric" wrote:

> I would like to be able to display the CustomProperties for postings
> in dropdowns on the page in author mode instead of having the content
> authors having to go into the page properties screen.  Here is one of
> my drop-down list examples.
>
> Posting State when recieving error;
> NRMODE=Unpublished
>  WBCMODE%3dAuthoringNew%26nr_emit%3dThinE
dit%26wbc_purpose%3dAuthoring
>
> private void  DropDownListType_SelectedIndexChanged(ob
ject sender,
> System.EventArgs e)
> {
> Microsoft.ContentManagement.Publishing.CmsApplicationContext
> appContext = new CmsApplicationContext();
> appContext. AuthenticateAsUser(username,password,Pub
lishingMode.Update);
> Posting posting  = appContext.Searches.GetByGuid(context.Posting.Guid)
> as Posting;
> **posting.CustomProperties["Type"].Value =
> this.DropDownListType.SelectedValue;
> appContext.CommitAll();
> appContext.Dispose();
> }
>
> ** is where I am getting this error "Object reference not set to an
> instance of an object"
>
> Thanks for your help.
>
> Eric
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:28 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register