PC Review


Reply
Thread Tools Rate Thread

How can I insert HTML markup that is interperted as such?

 
 
_Who
Guest
Posts: n/a
 
      2nd Sep 2008
In the .aspx I have

<p runat="server" id="qq" > </p>

and in the aspx.vb I have

Protected Sub qq_Init(ByVal sender As Object, ByVal e As System.EventArgs)
Handles qq.Init

strContents = "<h1>QQQQQQ</h1>"

qq.InnerText = strContents

End Sub

But this produces as text

<h1>QQQQQQ</h1>

The tags are treated as text.

How can I insert HTML markup that is interpreted as such?



Thanks




 
Reply With Quote
 
 
 
 
George
Guest
Posts: n/a
 
      2nd Sep 2008
"_Who" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In the .aspx I have
>
> <p runat="server" id="qq" > </p>
>
> and in the aspx.vb I have
>
> Protected Sub qq_Init(ByVal sender As Object, ByVal e As System.EventArgs)
> Handles qq.Init
>
> strContents = "<h1>QQQQQQ</h1>"
>
> qq.InnerText = strContents
>
> End Sub
>
> But this produces as text
>
> <h1>QQQQQQ</h1>
>
> The tags are treated as text.
>
> How can I insert HTML markup that is interpreted as such?
>
>
>
> Thanks
>
>
>
>




I belive there is InnerHtml which will not HtmlEncode the string you put
in..

George.

 
Reply With Quote
 
_Who
Guest
Posts: n/a
 
      2nd Sep 2008
I almost have it working!

> In the .aspx I have
>
> <p runat="server" id="qq" > </p>
>
> and in the aspx.vb I have
>
> Protected Sub qq_Init(ByVal sender As Object, ByVal e As System.EventArgs)
> Handles qq.Init
>


Dim csmKey As String = "CopyHtml"

Dim csmType As Type = Me.GetType()

Dim csm As ClientScriptManager = Page.ClientScript

If (Not csm.IsStartupScriptRegistered(csmType, csmKey)) Then

Dim csmScript As New StringBuilder() 'The startup script literal to register

csmScript.Append("document.write('<h1>ssssss</h1>")

csmScript.Append("<p>eeee</p>")

csmScript.Append("');")


csm.RegisterStartupScript(csmType, csmKey, csmScript.ToString, True)

End If

>
> End Sub
>

This does produce the formated tex on the page

But at the bottom of the page. Not where the qq is.

How can I control where it goes?
>
>
>
> Thanks
>
>
>
>



 
Reply With Quote
 
_Who
Guest
Posts: n/a
 
      2nd Sep 2008

"George" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> "_Who" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> In the .aspx I have
>>
>> <p runat="server" id="qq" > </p>
>>
>> and in the aspx.vb I have
>>
>> Protected Sub qq_Init(ByVal sender As Object, ByVal e As
>> System.EventArgs) Handles qq.Init
>>
>> strContents = "<h1>QQQQQQ</h1>"
>>
>> qq.InnerText = strContents
>>
>> End Sub
>>
>> But this produces as text
>>
>> <h1>QQQQQQ</h1>
>>
>> The tags are treated as text.
>>
>> How can I insert HTML markup that is interpreted as such?
>>
>>
>>
>> Thanks
>>
>>
>>
>>

>
>
>
> I belive there is InnerHtml which will not HtmlEncode the string you put



That makes sense. I'll look for it.
Please see my other reply to this topic.
Thanks

> in..
>
> George.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML Markup GS80 Microsoft Word Document Management 3 13th Feb 2008 09:44 AM
Remove html markup =?Utf-8?B?U3R1YXJ0?= Microsoft Excel Worksheet Functions 19 25th Nov 2005 03:47 PM
how do i insert HTML markup in frontpage 2003? =?Utf-8?B?c29jb25mdXNlZA==?= Microsoft Frontpage 1 6th Apr 2005 10:59 AM
Word->HTML w/o XML markup? Barbara White Microsoft Word Document Management 6 24th Jan 2005 04:30 PM
How to strip HTML markup from string? Michal A. Valasek Microsoft ASP .NET 2 12th Aug 2003 07:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:45 PM.