CodeSmith Community
Your Code. Your Way. Faster!

Admin Web Page issue when more than one blob field exists for a table.

Latest post 08-14-2007 8:44 AM by joseph_guadagno. 0 replies.
  • 08-14-2007 8:44 AM

    Admin Web Page issue when more than one blob field exists for a table.

    When you have more than one "blob" field on a table, the admin web page generated for that table causes a runtime error.  The \ASP.NET\Common\Admin\Entity.aspx.cst has a const string _blobTemplate, which assumes that only one blob field exists for one table.  I corrected the issue by adding an addition format statement.

    const string _blobTemplate =@" ... 

    ... 

    <itemtemplate>
                        <ajaxToolkit:ModalPopupExtender id='ModalPopupExtender{3}' runat='server'
                            TargetControlID='LinkButton{3}'
                            PopupControlID='Panel1'
                            OkControlID='Button1'
                            BackgroundCssClass='ModalBackground'
                            DynamicControlID='lblPreview'
                            DynamicContextKey='<%# DataBinder.Eval(Container.DataItem, ""{2}"") %>'
                            DynamicServiceMethod='Get{1}Content' />
                        <asp:LinkButton ID='LinkButton{3}' runat='server' Text='Preview' />
    </itemtemplate>

     In addition, line 107: Response.Write(WriteBlobTemplateField(column, suffix) + "\r\n");                          

    lines 311-315:

    public string WriteBlobTemplateField(ColumnSchema column, int suffix)
    {
        string propertyName = GetPropertyName(column);
        return string.Format(_blobTemplate, GetFriendlyName(column), propertyName, GetPropertyName(SourceTable.PrimaryKey.MemberColumns[0]), suffix);
    }
                               

     

    Joseph Guadagno jguadagno@hotmail.com http://www.josephguadagno.net
    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems