0

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:

<a href="test.jpg" 
   title="title here" 
   id="testimage" 
   rel="hint-text: CLICK TO ZOOM" 
   style="position: relative; display: inline-block">image goes here</a>

But after rendering, it looks like that:

<a href="test.jpg" 
   title id="testimage" 
   rel="hint-text: CLICK TO ZOOM" 
   style="position: relative; display: inline-block">image goes here</a>

At first i thought it could be something to do with the controls Mode property, but even if i change the Mode to PassThrough it still does not render the value of the tittle attribute.

EDIT: The code for the literal is as folows:

LiteralControl.Text = "<a href='test.jpg' title='title here' id='testimage' rel='hint-text: CLICK TO ZOOM' style='position: relative; display: inline-block'>image goes here</a>"

Does any of you guys have this problem and happens to know the solution?

Tommy
  • 39,592
  • 10
  • 90
  • 121
Ademar
  • 5,657
  • 1
  • 17
  • 23

0 Answers0