Custom date picker for start date
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 > Custom date picker for start date




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

    Custom date picker for start date  
microsoft.public.sharepoint.portalserver


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


 
05-13-04 10:52 PM

Hi,

I am writing an application that has two custom date pickers as placeholders
on a posting. I have written a custom handler in the global.asax so that on
approval, if the posting is one that contains these two date pickers, it
should set the value of Start Date and the expiry date.

However, it seems that when accessing the rawdata of the datepicker control
before approval gets the default date (eg, todays date). It is only after
approval that I can programmatically get the value of this placeholder - I'm
guessing that the data doesn't get persisted in an accessable way until
after approval.

What this means is that when a user creates a page, they set the two date
pickers, then save and exit, approve, but the start date and expiry date are
set to start today and expire tomorrow (this is due to the default values).
However, when the user then edits the page and re-saves and approves, the
start date and expiry date are set correctly as the values are now
accessable.

This is obviously not the desired solution, does anyone have some ideas on
how to overcome this problem?

John-Daniel Trask







[ Post a follow-up to this message ]



    Re: Custom date picker for start date  
Trevor Grant


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


 
05-19-04 10:49 PM

Hi

By having the expiry date to tomorrow, there's already customization done in
the workflow event handlers. So that part of the code works. From what you
have described, it seems that you may be having problems reading the
contents of the placeholder when it's being created for the first time. I've
tried using Request.Form["PlaceholderName":] to access the contents of t
he
placholder in the event handlers. That worked. However, I should add that it
caused my application to behave a little strangely after. The cause was
never traced but was attributed to something related to a database
inconsistency.

Instead of using the workflow event, have you considered writing a control
that saves the values directly to the start and expiry date property of the
posting? Stefan has an excellent sample written in his blog, you can find it
here:
http://weblogs.asp.net/stefan_gossn.../25/119613.aspx

Trevor

"microsoft.public.sharepoint.portalserver" <john-danielt@intergen.net.nz>
wrote in message news:uy%23UwwSOEHA.2876@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I am writing an application that has two custom date pickers as
placeholders
> on a posting. I have written a custom handler in the global.asax so that
on
> approval, if the posting is one that contains these two date pickers, it
> should set the value of Start Date and the expiry date.
>
> However, it seems that when accessing the rawdata of the datepicker
control
> before approval gets the default date (eg, todays date). It is only after
> approval that I can programmatically get the value of this placeholder -
I'm
> guessing that the data doesn't get persisted in an accessable way until
> after approval.
>
> What this means is that when a user creates a page, they set the two date
> pickers, then save and exit, approve, but the start date and expiry date
are
> set to start today and expire tomorrow (this is due to the default
values).
> However, when the user then edits the page and re-saves and approves, the
> start date and expiry date are set correctly as the values are now
> accessable.
>
> This is obviously not the desired solution, does anyone have some ideas on
> how to overcome this problem?
>
> John-Daniel Trask
>
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:32 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