Stefan [MSFT]
Guest
|
Posted:
Tue Oct 25, 2005 12:50 pm Post subject:
Re: Placeholder value |
|
|
Hi gg,
first of all: never use DataSource.RawContent.
See here for details:
http://blogs.technet.com/stefan_gossner/archive/2004/04/24/119546.aspx
In addition: settings a placeholder value in a button event is usually not
possible as you need to be in update mode to update a placeholder and I
assume that CmsHttpContext.Current.Mode will be Unpublished and not Update
in this event handler.
What you could do is to update the content of the placeholder control. Is
this what you are looking for?
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
----------------------
"gg" <gigino@gmail.com> wrote in message
news:1130227595.667861.51280@z14g2000cwz.googlegroups.com...
| Quote: | Hi i assign a dateTime value to a placeholder by this events
void Selection_Change(Object sender, EventArgs e)
{
Posting thisPosting = CmsHttpContext.Current.Posting;
TXTNewsExpirationDate.Text="";
foreach(DateTime day in Calendar1.SelectedDates)
{
TXTNewsExpirationDate.Text += day.Date.ToShortDateString();
thisPosting.Placeholders["PHExpirationDate"].Datasource.RawContent=TXTNewsExpirationDate.Text.ToString();
}
}
the value is write on the placeholder while the event is raised, but
when i reload the template after saving it, the placeholder is empty.
Why?
|
|
|