display html file in ajax update panel

M

Manuel

Hello,

I use the following code to display the content of an html file readed from
disk inside an UPDATEPANEL With AJAX.

divhtml.InnerHtml = myBuilder.ToString() ;

At debug time It gives me an htmlFile runtime error showing the code below

try
{
this._webRequest.Completed(Sys.EventArg.Empty);
}
finally { <---- here the error

Please note that the tag <div id="divhtml" runat="server" /> is inside the
UPDATEPANEL With AJAX.

Please help
thank you
 
A

Allen Chen [MSFT]

Hi Manuel,
try
{
this._webRequest.Completed(Sys.EventArg.Empty);
}
finally { <---- here the error

I'd like to help. But with the code you provided it's hard for me to repro
this issue. Could you send me a demo that can reproduce this problem? My
email is (e-mail address removed) update here after sending the project
in case I missed that email.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Allen Chen [MSFT]

Hi Manuel,

Thanks for your project. I've reproduced this issue. The problem is, in the
htm file there's a form tag:

<form action="http://trovaprezzi.mytech.it/ctl/do/search" id="search"
method="get">
<div>

<label class="articoli-title" for="s">

Cosa vuoi comprare?</label><input class="text" id="s"
name="siteSearchQuery" onblur="if (this.value=='') this.value='Trova il
prezzo migliore';"

onclick="this.value='';" value="Trova il prezzo migliore" />

<input name="fromform" type="hidden" value="true" />

<button class="cta internal" type="submit">

<span class="t"><span></span></span><span
class="cont"><span>Cerca</span></span><span

class="b"><span> </span></span>

</button>
</div>
</form>

It will break down the functionality of UpdatePanel. I think you have two
options to solve this issue:

1. Remove the <form> tag.
2. If it's possible, try to append <iframe
src="http://server/index.htm"></iframe> to the InnerHTML of div. You can
even do this using JavaScript directly.

Please let me know if the above solution works. If you need additional
assistance on the above two solutions please feel free to ask.


Regards,
Allen Chen
Microsoft Online Support
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top