CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 11/7/2005 9:47:09 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 71 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
EdenMachine
Asp.Net User
How can I put Literal content into a User Control?11/7/2005 9:47:09 PM

0/0

Here's what I need to be able to do...

<uc1:MyCostomControl id="cc1" runat="server" Title="This is a poperty added to create a title">
   <h3>Some header content here</h3>
   <p> A bunch of content here...A bunch of content here...A bunch of content here...
         <a href="#">With links and stuff</a>
      And all kind of other literal content... just like a regular label tag has
</uc1:MyCostomControl>

And it outputs like below...


This is a poperty added to create a title



Some header content here

A bunch of content here...A bunch of content here...A bunch of content here... With links and stuff And all kind of other literal content... just like a regular label tag has



Rich
http://www.DevAndDesign.com/
bleroy
Asp.Net User
Re: How can I put Literal content into a User Control?11/24/2005 1:37:21 AM

0/0

Sure, you just need to add the following attributes to your control's class:
[ParseChildren(false)]
[PersistChildren(true)]

You could also derive from Panel or implement a property of type ITemplate.

But except if you go for the 3rd solution, this can't be a user control, it has to be a custom control: where would the contents defined in the ascx file go?
Bertrand
----
This posting is provided "AS IS" with no warranties, and confers no rights.
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro Visual Studio .NET: From Professional to Expert Authors: Bill Sempf, James Greenwood, Rob Harrop, Brian Bischof, Colt Kwong, Donald Xie, Kunal Cheda, Jon Reid, Jan Machacek, Pages: 571, Published: 2004
Microsoft Content Management Server 2002: A Complete Guide Authors: Bill English, Olga Londer, Todd Bleeker, Shawn Shell, Stephen Cawood, Pages: 1092, Published: 2003
Stuart and Sundeen's mental health nursing: Principles and Practice Authors: Ben Thomas, Sally Hardy, Penny Cutting, Gail Wiscarz Stuart, Sandra J. Sundeen, Pages: 734, Published: 1997
Intellectual Property Rights for Engineers: IEE Management of Technology S. Authors: Vivien Irish, Institution of Electrical Engineers, Pages: 208, Published: 2005
Creative Content for the Web Authors: Marc Millon, Pages: 188, Published: 1999
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
ASP.NET 2.0 Black Book: black book Authors: Dreamtech Software, Dreamtech Software, Charul Shukla, Anil Kumar Barnwal, Dreamtech Software India, Pages: 1167, Published: 2006
World telecommunication development report 1995: information infrastructures Authors: unknown, Pages: 0, Published: 1995
The Human-Computer Interaction Handbook: Fundamentals, Evolving Technologies, and Emerging Applications Authors: Andrew Sears, Julie A. Jacko, Pages: 1358, Published: 2008

Web:
How can I put Literal content into a User Control? - ASP.NET Forums How can I put Literal content into a User Control? Last post 11-23-2005 8:37 PM by bleroy. 1 replies. Sort Posts: ...
"Literal content is not allowed within a user control"? - .NET ASP "Literal content is not allowed within a user control"? ... Can I create a user control so that when I drop it on the web form I can put text between the ...
b# - Precompiling ASP.NET Applications And The Dreaded ... Digging a little deeper into the error, I found that this happens when your user control has literal content in it that gets embedded as a Win32 resource ...
UserControl Methods (System.Web.UI) Determines if the server control holds only literal content. ... Parses an input string into a Control object on the Web Forms page or user control. ...
Steve's Website - A blog about software development by a contract ... Just add the ParseChildren attribute to your User Control's class and set it to true and supply the name of the field it should put any literal content into ...
Weird error - Literal content is not allowed within a 'skin file' Literal content ('Weird error - Literal content is not allowed within a 'skin file' and have run into a weird problem trying to add a skin file. ... Literal content ('CoDe Magazine - Article: Compilation and Deployment in ASP.NET 2.0 Each container contains literal content and controls, which are also parsed ... project and the compiler will put all of them together into a single class. ...
Cutting Edge: Extending umbraco to use exsisting controls ... EventArgs e) { // Put user code to initialize the page here Literal l = new Literal(); l. .... rendered nicely into the existing content from umbraco. ...
ASP.Net Tutorial - Adding Dynamic Content to Your Pages (ASP.Net ... For my tutorial pages on the site, I put each tutorial in a user control, ... your page into the Content field and not have to worry about loading controls. ...

Videos:
Objects: they just work Google London Test Automation Conference (LTAC) Google Tech Talks September 8th, 2006 Presenter: Bob Binder
www.moldytoaster.com sexy videos watch my sexy yugloo (\__/) (0'.'0) (")_(") Harbiscus34 (9 months ago) Show Hide Marked as spam 0 Good comment Poor comment Reply Peop...
www.moldytoaster.com educated you morons, i have no tolerance for ignorance because it fuels hate, so grow up and out of the whole emo thing leehoward07 (9 months ago) S...




Search This Site:










solpartmenu problem

aspdotnetsearch v.02a

upgrading woes

not hitting the breakpoints (vs 2005)

machinename/dns issue

how to kill formsauthentication when user log's out.

simple setdirty() problem

themes / skins

adding image as a watermark to all web pages

installation problem.

default dnn editor - how can i remove buttons?

problems with the <asp:loginview> .net 2.0

browse configuration error

password reminder for super users

redirect after sometime....

disabling edit option

multi-programmer development tips?

dynamically removing child controls of a placeholder.

portal failed to install

an idea for caching. is it plausible?

adding portalcsvs to source control

html in treeview node?

is there a way to change the default "country' box on the registration form on a portal basis

error using the skin object [login] in the skin

3.1 and ie 5

changing text colors

bilingual site

coding, testing, using integrated windows authentication

is this normal behavior?

visual studio 2003 problem

 
All Times Are GMT