display html file in ajax update panel

  • Thread starter Thread starter Manuel
  • Start date Start date
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
 
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.
 
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
 
Back
Top