Questions tagged [asp-literal]

The Literal control is used to display text on a page. The text is programmable. Note: This control does not let you apply styles to its content!

9 questions
11
votes
2 answers

PlaceHolder vs Literal for adding HTML markup generated at runtime

This question points out Literal vs Label while this question points out Panel VS. PlaceHolder but just today I was debating with my colleague on using PlacHolder vs Literal for adding HTML markup which is generated at runtime. Both controls do not…
Ahmed Atia
  • 17,848
  • 25
  • 91
  • 133
2
votes
1 answer

Using asp:Literal text in html attributes

quick question. Is there a way to use asp:Literal text in an HTML attribute? Example I am working on an overall solution to a…
David
  • 573
  • 7
  • 40
0
votes
1 answer

I have an asp Textbox expressed as the text property of an ASP Literal. How do I get the Text value of the TextBox?

I have an asp.net page with C# code behind. In the asp page, I have a few asp Literals. As an example, I have a Literal called "ltrtitle". In the code behind, I set the Text property of the literal to…
pmcs
  • 51
  • 1
  • 10
0
votes
1 answer

Can't find code behind files in Sitecore File Explorer

When I view an ascx file from Sitecore File Manager and it displays something like CodeBehind="Promo Downloads.ascx.cs in the header, but It doesn't seem to exist. There is an asp:Literal control I'm trying to figure out where it's coming from.
leflis
  • 21
  • 9
0
votes
0 answers

how to add a label text (dynamically) to a literal in code behind?

I want to add some controls to my form dynamically. in html side: my code in c# (code behind) is like below: string str_contxt = "hi dear user!"; img2.ImageUrl =…
s.m
  • 209
  • 2
  • 7
  • 17
0
votes
0 answers

asp:Literal strips out title attribute value

I am working on a asp.net website (web forms and mvc) where asp:Literal is used in a few pages. I needed to change the content of one page to add a simple title attribute to the existing tag. So i need the rendered result to be:
Ademar
  • 5,657
  • 1
  • 17
  • 23
0
votes
3 answers

Define a ASP:Literal (in a control) in the back-end of the page it is called to

I have created a lot of asp:literal's inside a control (vehicle/finance-boxes.ascx) Deposit
wilsonlego
  • 97
  • 1
  • 2
  • 15
0
votes
1 answer

Asp.net, Syntax highlight code from file with google prettify

In my page I will get the ID from link parameters, with that ID I will search the database for the file path, after reading the file and storing its contents I want to put its contents inside my
 tag... So I will have a literal in which the…
datalekz
  • 129
  • 1
  • 14
0
votes
2 answers

Asp Literal won't disappear after refreshing the page?

I have aspx page with asp Literal. It's the control page, and literal will show message, when data has been saved to database, (after pressing SAVE button). It work, but after i have saved and trying to refresh page, the literal text won't…
Teemu Laine
  • 361
  • 1
  • 3
  • 13