[CLOSED] Ext.NET 2.0 breaks ASP.NET RegisterHiddenField method

  1. #1

    [CLOSED] Ext.NET 2.0 breaks ASP.NET RegisterHiddenField method

    Not sure how you guys were able to hijack asp.net's RegisterHiddenField method but if a page contains Ext's ResourceManager, calling Page.ClientScript.RegisterHiddenField will not output the field to the client. Remove Ext ResourceManager and it's all good.


    
        Private Sub Test30_Load(sender As Object, e As System.EventArgs) Handles Me.Load        
            Me.ClientScript.RegisterHiddenField("testhid", "1")
        End Sub
    Last edited by Daniil; Nov 28, 2012 at 3:01 PM. Reason: [CLOSED]
  2. #2
    The field might be getting parsed out when we do a final clean-up of all garbage html produced by asp.net.

    Are you just calling RegisterHiddenField during the Page_Load?
    Geoffrey McGill
    Founder
  3. #3
    Quote Originally Posted by geoffrey.mcgill View Post
    The field might be getting parsed out when we do a final clean-up of all garbage html produced by asp.net.

    Are you just calling RegisterHiddenField during the Page_Load?
    I am actually calling it during PreRender but I also tried Page_Load and they both failed.
  4. #4
    Thank you for report. We will investigate it.
    At this moment, I suggest to deactivate viewstate removing as workaround
    <ext:ResourceManager runat="server" DisableViewState="false" />
    I will post here when a fix will be available in SVN
  5. #5
    Another workaround,
    - find the following line in Ext.Net\Core\ResourceManager\ResourceManager.cs and remove it
    writer.Write(ResourceManager.RemoveBlocksToken);
  6. #6
    I think this issue existed in Ext.NET v1.x too but by default viewstate was not disabled. So yes, once I turned back on viewstate for that one page, everything works fine.

    I still think this should be fixed for compatibility with 3rd party controls. Alot of older 3rd party controls do use RegisterHiddenField. We only use that control on one of our pages so it wasn't a big deal to turn on viewstate for that one page.
  7. #7
    Quote Originally Posted by jchau View Post
    I still think this should be fixed for compatibility with 3rd party controls.
    As noted above, we are working on a fix.
    Geoffrey McGill
    Founder
  8. #8
    Hi @jchau,

    It was fixed in v2. The fix will be included in the upcoming v2.1 release. Thanks again for the report.

    I was unable to reproduce it in v1 with the following sample. Could you provide a test case to reproduce?

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            this.ClientScript.RegisterHiddenField("hidden1", "1");
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" DisableViewState="true" />
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] When I try to set an item in the comboBox it breaks.
    By Fahd in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 19, 2012, 9:15 PM
  2. [CLOSED] Asp.net scriptmanager breaks ext date formatting
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 29, 2011, 7:02 PM
  3. [CLOSED] html tag in text content breaks app
    By jwf in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: May 18, 2011, 6:17 PM
  4. [CLOSED] RowSelectionModel.UpdateSelection() breaks RecordID
    By alexp in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 14, 2009, 12:38 PM
  5. [FIXED] 0.5.3 Breaks Fieldsets
    By jlertle in forum Bugs
    Replies: 4
    Last Post: Jul 02, 2008, 11:22 PM

Posting Permissions