display html file in ajax update panel

Discussion in 'ASP .Net' started by Manuel, Jun 9, 2009.

  1. Manuel

    Manuel Guest

    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
    Manuel, Jun 9, 2009
    #1
    1. Advertising

  2. 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 se 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:
    .

    ==================================================
    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.
    Allen Chen [MSFT], Jun 10, 2009
    #2
    1. Advertising

  3. Manuel

    Manuel Guest

    Hi,

    I've sent to you the demo

    thank you very much

    Manuel

    "Allen Chen [MSFT]" wrote:

    > 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 se 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:
    > .
    >
    > ==================================================
    > 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.
    >
    >
    >
    >
    >
    Manuel, Jun 11, 2009
    #3
  4. 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
    Allen Chen [MSFT], Jun 11, 2009
    #4
  5. Manuel

    Manuel Guest

    Thanks for the help Allen Chen,

    Manuel

    "Allen Chen [MSFT]" wrote:

    > 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
    >
    >
    Manuel, Jun 12, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?cm9kY2hhcg==?=

    datalist and ajax update panel

    =?Utf-8?B?cm9kY2hhcg==?=, Oct 2, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    722
    =?Utf-8?B?cm9kY2hhcg==?=
    Oct 2, 2006
  2. =?Utf-8?B?cm9kY2hhcg==?=

    ajax update panel trigger

    =?Utf-8?B?cm9kY2hhcg==?=, Oct 6, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    522
    =?Utf-8?B?cm9kY2hhcg==?=
    Oct 7, 2006
  3. GaryDean

    AJAX Update Panel w I.E.7 Problem

    GaryDean, Dec 4, 2006, in forum: ASP .Net
    Replies:
    10
    Views:
    5,019
    Steven Cheng[MSFT]
    Dec 12, 2006
  4. =?Utf-8?B?Qw==?=

    ASP.NET Ajax Update Panel in ContentPlaceHolder

    =?Utf-8?B?Qw==?=, Feb 12, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    1,304
    =?Utf-8?B?Qw==?=
    Feb 12, 2007
  5. Elmo Watson
    Replies:
    0
    Views:
    405
    Elmo Watson
    May 8, 2007
Loading...

Share This Page