Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

Last post 12-26-2008 10:17 PM by Mikhail Arkhipov (MSFT). 17 replies.

Sort Posts:

  • Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    11-22-2007, 4:30 AM
    Locked
    • Member
      point Member
    • arild@live.no
    • Member since 11-22-2007, 9:20 AM
    • Norway
    • Posts 3

    I have a cuple of radGrid controls etc on my page, when I switch between source and design view, the Visual Studio produces thousends of #160; in my code, every second line approx. Alot of   is also created. The second problem is that is changes the tagPrefix on my controls, see example below.

    I first see this with visual studio 2008 beta 2, so I was happy when RTM got out :) But there is the problem as well?

    Hopefully any have an idea? I have checked arround some, and people get this behaviour in 2008 when using other third party controls, so I dont think it has any thing with telerik controls to do.

    Suggestions?

    Best regards
    Arild
    Norway

    Here is an example of "corrupted" source (sorry for the "mess"):

    </radM:radG:PageView>

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    <radM:radG:PageView ID="pageAssessment" runat="server" Width="100%">

    &#160;<table style="border-left:solid 1px gray">

     

    &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;

    <tr>

     

    &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;

    <td>

     

    &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;

    <div id="divAssessmentGrid" runat="server" style="width: 600px">

     

    &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;

    <radM:radM:radG:RadGrid ID="gridAssessments" runat="server"

    AutoGenerateColumns="False" GridLines="None" Width="100%">

    <mastertableview>

    <Columns>

    <radM:radM:radG:GridBoundColumn HeaderText="CutOff">

    </radM:radM:radG:GridBoundColumn>

    <radM:radM:radG:GridBoundColumn HeaderText="Probability">

    </radM:radM:radG:GridBoundColumn>

    <radM:radM:radG:GridBoundColumn HeaderText="Consequence">

    </radM:radM:radG:GridBoundColumn>

    <radM:radM:radG:GridBoundColumn HeaderText="Prob.value">

    </radM:radM:radG:GridBoundColumn>

    <radM:radM:radG:GridBoundColumn HeaderText="Cons.value">

    </radM:radM:radG:GridBoundColumn>

    <radM:radM:radG:GridBoundColumn HeaderText="Risk Level">

    </radM:radM:radG:GridBoundColumn>

    </Columns>

     

     

    </mastertableview>

    </radM:radM:radG:RadGrid>

     

    &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;

    </div>

  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    11-22-2007, 11:20 AM
    Answer
    Locked
    • Member
      point Member
    • arild@live.no
    • Member since 11-22-2007, 9:20 AM
    • Norway
    • Posts 3

    Some more information: this seems not an issue if all the tagPrefix lines on top of the page has the same tagPrefix set.

     Some of my page:

    <%@ Register assembly="RadGrid.Net2" namespace="Telerik.WebControls" tagPrefix="radG" %>

    <%@ Register assembly="RadMenu.Net2" namespace="Telerik.WebControls" tagprefix="radG" %>

    When the tagPrefix for one of them was radM, this problem occured alot. Changed all to radG, havn't experienced problems yet. But this has to be a bug in Visual Studio 2008?!

  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    11-26-2007, 7:30 PM
    Locked

    Does you page have a master page? Perhaps some other control is registered for the same namespace?

    Thanks

    ------------------------------------------------------------

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    11-27-2007, 6:08 AM
    Locked
    • Member
      point Member
    • arild@live.no
    • Member since 11-22-2007, 9:20 AM
    • Norway
    • Posts 3

    No, this is not in a master page, a strait forward aspx page. Yes, when you drag in for example a grid control and a treeview control from Telerik, you get two lines on top of the page (in source) both have namespace="Telerik.Controls" but default they have different tagPrefix. Have worked now for a while after applying my fix (setting both the namespace (for the telerik controls) to the same) and have not seen the problem after, but since this will "destroy" the aspx source code by default I guess its a bug that needs to be fixed.

    Thanks :)

  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    05-20-2008, 2:43 PM
    Locked
    • Member
      8 point Member
    • carlshe
    • Member since 07-18-2007, 4:14 AM
    • Posts 16
    I faced the same situation. I designed a composite webcontrol based on AjaxToolkit controls. such as a text box combined with a requirevalidator control. there are always many annoying '&nbsp' automatically generated between begin tag and end tag of the newly designed control. Could you please inform me of the solution. thank you very much!
  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    05-20-2008, 6:12 PM
    Locked

    This is addressed in SP1

    Thanks

    ------------------------------------------------------------

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    05-21-2008, 9:50 AM
    Locked
    • Participant
      1,988 point Participant
    • freedom1029
    • Member since 11-08-2002, 12:59 PM
    • Montreal
    • Posts 493

    Well I have SP1Beta1 installed and I still get the exact same problem.  Did someone report this to telerik? I would be curious to see what they are saying about it.

    Eric

  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    05-26-2008, 9:10 PM
    Locked

    May I have repro steps and sample markup?

    Thanks

    ------------------------------------------------------------

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    06-12-2008, 11:55 AM
    Locked
    • Member
      8 point Member
    • carlshe
    • Member since 07-18-2007, 4:14 AM
    • Posts 16
    It is difficult to reproduce the situation. But it happens very often. For example, I put a self-designed webcontrol(SC1:MultiLineBox) on the page.  <SC1:MultiLineBox ID="MultiLineBox1" runat="server" MaxLength="1000" Rows="6"  Width="875px" LimitMax="" LimitMin="" RequireInput="False" TextMode="MultiLine"  WatermarkCssClass="" WaterMarkText="" BorderColor="Blue" BorderWidth="1px" > textstring</SC1:MultiLineBox>

     

     Initially, it acts normal. But sometimes, especially while switching between design and source mode, there are many '&nbsp;' generated automatically between the begin and end tag of <SC1:MultiLineBox>.  

     

    <SC1:MultiLineBox ID="MultiLineBox1" runat="server" MaxLength="1000" Rows="6"  Width="875px" LimitMax="" LimitMin=""  RequireInput="False" TextMode="MultiLine"  WatermarkCssClass="" WaterMarkText="" BorderColor="Blue"  BorderWidth="1px" > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textstring</SC1:MultiLineBox>  

     

    In general, this situation only happen to newly developed webcontrol. While using VS2005, no such a case.

    Thank you!

  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    06-12-2008, 12:06 PM
    Locked
    • Participant
      1,988 point Participant
    • freedom1029
    • Member since 11-08-2002, 12:59 PM
    • Montreal
    • Posts 493

    Yes I agree, it is difficult to repreduce and seem to be somehow random.  In my case the injected code happens a lot in between the ajax update panel tags.

    Eric

  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    06-23-2008, 9:20 AM
    Locked
    • Member
      4 point Member
    • mattkollar
    • Member since 04-27-2007, 1:29 PM
    • Posts 15

     Does anyone know if this problem has ever been resolved?  I also have SP1 beta installed and I still get the error.

     Thanks,

    -Matt

  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    06-24-2008, 4:06 PM
    Locked

    Let's check if it is the same issue or not. Can you provide repro steps in your case?

    Thanks

    ------------------------------------------------------------

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    09-23-2008, 9:21 PM
    Locked
    • Member
      4 point Member
    • davehunt00
    • Member since 07-25-2008, 7:28 PM
    • Posts 8

    I have hit this several times with VS2008-SP1 (9.0.21022.8).  I have a very large page (tab container, multiple formviews, etc).  I don't have repro steps for it as I often don't notice exactly when it happens (due to the size of my page). But I'll notice at run-time when the UI of the page is off because of all the $nbsp; that have been inserted.

     I suspect this may be related to the bug where the mouse is sometimes frozen when selecting multiple cells in a table in the Designer.  Basically have a table with multiple rows and columns. It probably helps to have a big page (to slow things down).  Select one of the cells. Drag with the mouse to select a second cell (I do this often to expose the "Table" handle). Often, this will freeze up VS. The mouse will move, but nothing happens when you click. If you click out of VS to another app, usually you can get mouse control back.  Sometimes, not always, when mouse control comes back it seems to think it should be sizing the row height and the table row will grow or shrink depending on how you move your mouse. If you click outside VS again, usually this stops.  If I was a bettin' man, that would be my guess for when the &nbsp;s are getting inserted.

     Sorry I can't provide better repro steps or code, but I can confirm it is still happening in SP1. I've probably had it happen 5 times since updating to SP1.

  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    11-20-2008, 3:35 PM
    Locked
    • Member
      32 point Member
    • Scotteb
    • Member since 02-23-2003, 9:53 PM
    • Texas
    • Posts 7

    I'm seeing a similar problem (of course, it could be a totally different issue).  I am running VS 2008 Pro SP1 as admin on Vista Business SP1.  I have several pages with two Infragistics WebPanel controls and the UltraWebMenu on them.  I have been experiencing minor corruption in the markup of the aspx files nearly every da this week.  For example, today I did the following

    1. Used the property panel to change the heading text of a Infragistics WebPanel
    2. Ran the site and received a parsing error.
    3. Looking at the file, found a few characters in the control before the WebPanel were missing

    The text should have been:

            <asp:Label ID="lblPageHeader" runat="server" Text="Your Dashboard "
                CssClass="miniHeader"></asp:Label>
            <hr />
            A welcome to the application would go here.

    However, this is what I found:

            <asp:Label ID="lblPageHeader" runat="server" Text="Your Dashboard "
                CssClass="miniHeader"></asp:Label
            A welcome to the application would go here.

    where the end bracket of the asp:label and entire hr tag were missing.  Unfortuantely, this did not occur in subsequent attempts to repro.  However, this is fairly similar to the corruption I've experienced the last few days - a portion of the markup just disappears.

    best,
    Scott

  • Re: Switch between design and source when having third party controls (ie. telerik) corrupts the aspx

    12-11-2008, 12:20 PM
    Locked
    • Member
      2 point Member
    • rlejeune
    • Member since 08-21-2008, 2:23 PM
    • Posts 1

    Sample problem here.  I'm running VS 2008 Pro SP1 on a Vista Home Edition.  I notice the problem more when I add a table then drag components, TextBoxes and etc, into the table cells.  After switching views to source and doing a select and replace, it found over 280,000 instances of &nbsp;.  VS 2008 after about 20 minutes of trying to remove the &nbsp; stopped responding.  Ended up having to open the aspx page in Note Pad and removing all these &nbsp;.  Very annoying to say the least!

     

    RL

Page 1 of 2 (18 items) 1 2 Next >