| Author |
Message |
Mary
Guest
|
Posted:
Mon Oct 31, 2005 5:50 pm Post subject:
Web User Control |
|
|
We have 5 postings under a same template file that has two
htmlPlaceholderControls; one of the htmlPlaceholderControl has same contents
for the 5 postings. When author edits the htmlPlaceControl’s content in one
of the 5 postings, we want to rest of the postings’ content updated
automatically.
Is that possible using web user control’ idea, which means: put a
htmlPlaceholderControl in an .ascx file? |
|
| Back to top |
|
 |
Mei Ying [MVP]
Guest
|
|
| Back to top |
|
 |
Mary
Guest
|
Posted:
Tue Nov 08, 2005 1:50 am Post subject:
RE: Web User Control |
|
|
Hi,
How should I use "RenderPhServerControl.cs" in my project ?
Thanks!
Mary
"Mei Ying [MVP]" wrote:
|
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Tue Nov 08, 2005 9:51 am Post subject:
Re: Web User Control |
|
|
Hi Mary,
do the following:
- create a new C# class library project
- add this RenderPhServerControl.cs to this project and remove the class1.cs
file
- compile the project
- add the resulting DLL to the VS.NET toolbar to use it similar to the other
server controls.
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
----------------------
"Mary" <mliu16@msn.com> wrote in message
news:E5AEC195-BE81-494D-B783-979C3FCE898F@microsoft.com...
|
|
| Back to top |
|
 |
Mary
Guest
|
Posted:
Tue Nov 08, 2005 5:51 pm Post subject:
Re: Web User Control |
|
|
Hi Stefan,
Now Compile errors (after following your suggestions)
(1) No overload for method 'DesignerAttribute' takes '0' arguments
(2) The type or namespace name 'RenderPlaceholderServerControl' could not be
found (are you missing a using directive or an assembly reference?)
What should I do?
Thanks!
Mary
"Stefan [MSFT]" wrote:
| Quote: | Hi Mary,
do the following:
- create a new C# class library project
- add this RenderPhServerControl.cs to this project and remove the class1.cs
file
- compile the project
- add the resulting DLL to the VS.NET toolbar to use it similar to the other
server controls.
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
----------------------
"Mary" <mliu16@msn.com> wrote in message
news:E5AEC195-BE81-494D-B783-979C3FCE898F@microsoft.com...
Hi,
How should I use "RenderPhServerControl.cs" in my project ?
Thanks!
Mary
"Mei Ying [MVP]" wrote:
Hi
You could use the Publishing API to retrieve the content of the
placeholder
and display it.
Take a look at this solution by Stefan:
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=1045e51d-f83d-4caf-99b9-8b395b722f24
--
regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Book: http://www.packtpub.com/book/mcms
Contact: meiyinglim@hotmail.com
---
"Mary" wrote:
We have 5 postings under a same template file that has two
htmlPlaceholderControls; one of the htmlPlaceholderControl has same
contents
for the 5 postings. When author edits the htmlPlaceControl's content in
one
of the 5 postings, we want to rest of the postings' content updated
automatically.
Is that possible using web user control' idea, which means: put a
htmlPlaceholderControl in an .ascx file?
|
|
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Tue Nov 08, 2005 5:51 pm Post subject:
Re: Web User Control |
|
|
Hi Mary,
did the DLL compile correct?
Please also check if the dll was added to the reference section of your web
project.
Usually this should happen automatically during the drag & drop but
sometimes it does not work and has to be added manually.
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
----------------------
"Mary" <mliu16@msn.com> wrote in message
news:F5EB306E-DED7-4E4C-A76C-FAFDCF3C4005@microsoft.com...
| Quote: | Hi Stefan,
Now Compile errors (after following your suggestions)
(1) No overload for method 'DesignerAttribute' takes '0' arguments
(2) The type or namespace name 'RenderPlaceholderServerControl' could not
be
found (are you missing a using directive or an assembly reference?)
What should I do?
Thanks!
Mary
"Stefan [MSFT]" wrote:
Hi Mary,
do the following:
- create a new C# class library project
- add this RenderPhServerControl.cs to this project and remove the
class1.cs
file
- compile the project
- add the resulting DLL to the VS.NET toolbar to use it similar to the
other
server controls.
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
----------------------
"Mary" <mliu16@msn.com> wrote in message
news:E5AEC195-BE81-494D-B783-979C3FCE898F@microsoft.com...
Hi,
How should I use "RenderPhServerControl.cs" in my project ?
Thanks!
Mary
"Mei Ying [MVP]" wrote:
Hi
You could use the Publishing API to retrieve the content of the
placeholder
and display it.
Take a look at this solution by Stefan:
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=1045e51d-f83d-4caf-99b9-8b395b722f24
--
regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Book: http://www.packtpub.com/book/mcms
Contact: meiyinglim@hotmail.com
---
"Mary" wrote:
We have 5 postings under a same template file that has two
htmlPlaceholderControls; one of the htmlPlaceholderControl has same
contents
for the 5 postings. When author edits the htmlPlaceControl's content
in
one
of the 5 postings, we want to rest of the postings' content updated
automatically.
Is that possible using web user control' idea, which means: put a
htmlPlaceholderControl in an .ascx file?
|
|
|
| Back to top |
|
 |
Mary
Guest
|
Posted:
Tue Nov 08, 2005 9:51 pm Post subject:
Re: Web User Control |
|
|
Hi Stefan,
Now, there is not any compile errors since I changed the C# class library
project's name to "RenderPlaceholderServerControl"
Everything works well for the "RenderPhServerControl" in the project.
Since this "RenderPhServerControl" behaves like a Placeholder in
presentation mode, when I want to edit this placeholder, I have to change it
back to the "htmlPlaceholderControl" which in Author mode; after editing,
change it back to RenderPhServerControl.
Thanks!
Mary
"Stefan [MSFT]" wrote:
| Quote: | Hi Mary,
did the DLL compile correct?
Please also check if the dll was added to the reference section of your web
project.
Usually this should happen automatically during the drag & drop but
sometimes it does not work and has to be added manually.
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
----------------------
"Mary" <mliu16@msn.com> wrote in message
news:F5EB306E-DED7-4E4C-A76C-FAFDCF3C4005@microsoft.com...
Hi Stefan,
Now Compile errors (after following your suggestions)
(1) No overload for method 'DesignerAttribute' takes '0' arguments
(2) The type or namespace name 'RenderPlaceholderServerControl' could not
be
found (are you missing a using directive or an assembly reference?)
What should I do?
Thanks!
Mary
"Stefan [MSFT]" wrote:
Hi Mary,
do the following:
- create a new C# class library project
- add this RenderPhServerControl.cs to this project and remove the
class1.cs
file
- compile the project
- add the resulting DLL to the VS.NET toolbar to use it similar to the
other
server controls.
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
----------------------
"Mary" <mliu16@msn.com> wrote in message
news:E5AEC195-BE81-494D-B783-979C3FCE898F@microsoft.com...
Hi,
How should I use "RenderPhServerControl.cs" in my project ?
Thanks!
Mary
"Mei Ying [MVP]" wrote:
Hi
You could use the Publishing API to retrieve the content of the
placeholder
and display it.
Take a look at this solution by Stefan:
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=1045e51d-f83d-4caf-99b9-8b395b722f24
--
regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Book: http://www.packtpub.com/book/mcms
Contact: meiyinglim@hotmail.com
---
"Mary" wrote:
We have 5 postings under a same template file that has two
htmlPlaceholderControls; one of the htmlPlaceholderControl has same
contents
for the 5 postings. When author edits the htmlPlaceControl's content
in
one
of the 5 postings, we want to rest of the postings' content updated
automatically.
Is that possible using web user control' idea, which means: put a
htmlPlaceholderControl in an .ascx file?
|
|
|
| Back to top |
|
 |
|
|
|
|