Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access to ContentPlaceHolder contents/HTML?

Posted on 2009-05-04
3
Medium Priority
?
484 Views
Last Modified: 2013-11-08
Is there a way to programmatically access the HTML or XML that is containe inside a ContentPlaceHolder when a page a built?  I want to duplicate the contents programmatcally when a submit button is presses so I can email the form as a whole.
0
Comment
Question by:jglazer63
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 24300011
I can advise few Solutions..

1st using ASP.NET....
Within ContentPlaceHolder you can have a Label/Literal and then access the TEXT of that Label within ContentPlaceHolder and duplicate it into another object.


2nd Solution is Client Side...

ContentPlaceHolder must be within a DIV (id attribuite), then use javaScript to get the innerHTML of that Div, then Store the Output into a Hidden Field, then by using ASP.NET you can access the TEXT/VALUE property of Hidden Field.
0
 

Author Comment

by:jglazer63
ID: 24300551
Do you think either of these would be viable to replace the HTML <input> tags with the text the person enters?  I thought of the DIV thing too but haven't played wih it yet.  Kinda hoping for a strictly .net solution.
0
 
LVL 23

Accepted Solution

by:
Saqib Khan earned 2000 total points
ID: 24308065
then You would Create a User Control, and Setup properties within User Control (For multiple Versions, you can change them).

Then in .NET use the LoadControl Method to load the Control, Setup properties for each instance, and create any many copes you want (The Right way:)).

Dim ctrl as userControl
ctrl = LoadControl("ControlName.Ascx")
ctrl.Property = "My name"

PlaceHolder.AddControl(ctrl)

.. make next copy (Instance), so far and so on...

 - Saqib
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question