email the contents of the contentplaceholder in a masterpage

M

mrmanju_2007

I am building a website using asp.net and c#. I am using the
masterpage concept. I have to implement a feature where I have to send
all the contents of the contentplaceholder thru email. I know how to
send the mail but i'm not able to get the contents which i need to
send. Can anyone please give some tips as to how to go about this
asap.
Thanks in advance.........
 
Joined
Jul 15, 2008
Messages
4
Reaction score
0
getting placeholder contents

remember when the assembled page makes it to the client, there isn't anything about a contentplaceholder in the code. You might already know this but here is a partial solution:

add a ContentPlaceHolder property to the Master page code behind.
Code:
Public ContentPlaceHolder contentPage
get{return this.ContentPlaceHolder1;}

Add the preprocessor directive to the top of the Content page.

Code:
<%@ MasterType VirtualPath="~/Master1.master" %>

access content place holder using Master.contentPage.
Code:
ContentPlaceHolder ph = Master.contentPage;

Now maybe someone can help or you might know how to get ContentPlaceholder contents into message body.

just remember, its only a partial page, not complete html.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top