Switching to Design Mode in VS2005

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have converted a vs 2003 solution to 2005 and when I try to switch to
design mode for a user control I get:

Cannot switch views: Validation (Internet Explorer 6): Element 'Style'
cannot be nested within element 'div'

Here is the html:


<div style="z-index: 101; left: 1px; width: 541px; position: absolute; top:
1px;
height: 290px">
<xwavegrid:smartgrid id="SmartGrid1" runat="server" style="z-index: 100;
left: 0px;
position: absolute; top: 0px">
<FooterStyle Height="20px"></FooterStyle>
<Columns>
<xwavegrid:SmartGridColumn DataField="asdf" AllowClientUpdates="False"
Key="sadf" ReadOnly="True" ColumnType="Text" Render="True"
IncludeInTotals="False" MaxLength="50" Value="" PrimaryKey="False" Format=""
Title="Column 0" ClipContents="False" SortExpression="" Visible="True"
IsHyperlink="False" PersistClientUpdatesOnDataBind="False">
<Style Width="100px"></Style>
</xwavegrid:SmartGridColumn>
</Columns>

<CaptionStyle Width="100%" Height="20px"></CaptionStyle>

<HeaderStyle Height="20px"></HeaderStyle>

<PagerStyle Width="100%"></PagerStyle>
</xwavegrid:smartgrid>
</div>

As you can see this is a custom webcontrol within a div. The custom control
has nested controls which have styles. This doesn't seem to be allowed, any
help appreciated
 
No. this is not the problem

see if you have any other style tag

it must be in head section

for instance
<head>

<title>asdasd</title>

<style></style>

</head>
 
Thanks for your response

This is the entire ascx file content.

<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="WebUserControl.ascx.cs"
Inherits="Test_WebUserControl" %>
<%@ Register Assembly="ApplicationFramework.WebControls"
Namespace="ApplicationFramework.WebControls.Grid"
TagPrefix="xwavegrid" %>
<div style="z-index: 101; left: 1px; width: 541px; position: absolute; top:
1px;
height: 290px">
<xwavegrid:smartgrid id=smartgrid1 runat="server" style="z-index: 102;
left: 0px; position: absolute; top: 0px">
<FooterStyle Height="20px"></FooterStyle>
<Columns>
<xwavegrid:SmartGridColumn DataField="sdf" AllowClientUpdates="False"
Key="df" ReadOnly="True" ColumnType="Text" Render="True"
IncludeInTotals="False" MaxLength="50" Value="" PrimaryKey="False" Format=""
Title="Column 0" ClipContents="False" SortExpression="" Visible="True"
IsHyperlink="False" PersistClientUpdatesOnDataBind="False">
<Style Width="100px"></Style>
</xwavegrid:SmartGridColumn>
</Columns>
</xwavegrid:smartgrid>
</div>

I have not added it to page, but I should still be able to switch to design
view.

Galin iliev said:
No. this is not the problem

see if you have any other style tag

it must be in head section

for instance
<head>

<title>asdasd</title>

<style></style>

</head>


--
Galin Iliev [MCSD, MCSD.NET]
Senior Software Developer
www.wordassist.com

Niall said:
I have converted a vs 2003 solution to 2005 and when I try to switch to
design mode for a user control I get:

Cannot switch views: Validation (Internet Explorer 6): Element 'Style'
cannot be nested within element 'div'

Here is the html:


<div style="z-index: 101; left: 1px; width: 541px; position: absolute;
top:
1px;
height: 290px">
<xwavegrid:smartgrid id="SmartGrid1" runat="server" style="z-index:
100;
left: 0px;
position: absolute; top: 0px">
<FooterStyle Height="20px"></FooterStyle>
<Columns>
<xwavegrid:SmartGridColumn DataField="asdf" AllowClientUpdates="False"
Key="sadf" ReadOnly="True" ColumnType="Text" Render="True"
IncludeInTotals="False" MaxLength="50" Value="" PrimaryKey="False"
Format=""
Title="Column 0" ClipContents="False" SortExpression="" Visible="True"
IsHyperlink="False" PersistClientUpdatesOnDataBind="False">
<Style Width="100px"></Style>
</xwavegrid:SmartGridColumn>
</Columns>

<CaptionStyle Width="100%" Height="20px"></CaptionStyle>

<HeaderStyle Height="20px"></HeaderStyle>

<PagerStyle Width="100%"></PagerStyle>
</xwavegrid:smartgrid>
</div>

As you can see this is a custom webcontrol within a div. The custom
control
has nested controls which have styles. This doesn't seem to be allowed,
any
help appreciated
 
seems like the referenced assembly cannot be found
check reference to
ApplicationFramework.WebControls


--
Galin Iliev [MCSD, MCSD.NET]
Senior Software Developer
www.wordassist.com

Niall said:
Thanks for your response

This is the entire ascx file content.

<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="WebUserControl.ascx.cs"
Inherits="Test_WebUserControl" %>
<%@ Register Assembly="ApplicationFramework.WebControls"
Namespace="ApplicationFramework.WebControls.Grid"
TagPrefix="xwavegrid" %>
<div style="z-index: 101; left: 1px; width: 541px; position: absolute;
top:
1px;
height: 290px">
<xwavegrid:smartgrid id=smartgrid1 runat="server" style="z-index: 102;
left: 0px; position: absolute; top: 0px">
<FooterStyle Height="20px"></FooterStyle>
<Columns>
<xwavegrid:SmartGridColumn DataField="sdf" AllowClientUpdates="False"
Key="df" ReadOnly="True" ColumnType="Text" Render="True"
IncludeInTotals="False" MaxLength="50" Value="" PrimaryKey="False"
Format=""
Title="Column 0" ClipContents="False" SortExpression="" Visible="True"
IsHyperlink="False" PersistClientUpdatesOnDataBind="False">
<Style Width="100px"></Style>
</xwavegrid:SmartGridColumn>
</Columns>
</xwavegrid:smartgrid>
</div>

I have not added it to page, but I should still be able to switch to
design
view.

Galin iliev said:
No. this is not the problem

see if you have any other style tag

it must be in head section

for instance
<head>

<title>asdasd</title>

<style></style>

</head>


--
Galin Iliev [MCSD, MCSD.NET]
Senior Software Developer
www.wordassist.com

Niall said:
I have converted a vs 2003 solution to 2005 and when I try to switch to
design mode for a user control I get:

Cannot switch views: Validation (Internet Explorer 6): Element 'Style'
cannot be nested within element 'div'

Here is the html:


<div style="z-index: 101; left: 1px; width: 541px; position: absolute;
top:
1px;
height: 290px">
<xwavegrid:smartgrid id="SmartGrid1" runat="server" style="z-index:
100;
left: 0px;
position: absolute; top: 0px">
<FooterStyle Height="20px"></FooterStyle>
<Columns>
<xwavegrid:SmartGridColumn DataField="asdf" AllowClientUpdates="False"
Key="sadf" ReadOnly="True" ColumnType="Text" Render="True"
IncludeInTotals="False" MaxLength="50" Value="" PrimaryKey="False"
Format=""
Title="Column 0" ClipContents="False" SortExpression="" Visible="True"
IsHyperlink="False" PersistClientUpdatesOnDataBind="False">
<Style Width="100px"></Style>
</xwavegrid:SmartGridColumn>
</Columns>

<CaptionStyle Width="100%" Height="20px"></CaptionStyle>

<HeaderStyle Height="20px"></HeaderStyle>

<PagerStyle Width="100%"></PagerStyle>
</xwavegrid:smartgrid>
</div>

As you can see this is a custom webcontrol within a div. The custom
control
has nested controls which have styles. This doesn't seem to be allowed,
any
help appreciated
 
No, all references are fine, the projects build and run fine, it is just
switching to design view?

Galin iliev said:
seems like the referenced assembly cannot be found
check reference to
ApplicationFramework.WebControls


--
Galin Iliev [MCSD, MCSD.NET]
Senior Software Developer
www.wordassist.com

Niall said:
Thanks for your response

This is the entire ascx file content.

<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="WebUserControl.ascx.cs"
Inherits="Test_WebUserControl" %>
<%@ Register Assembly="ApplicationFramework.WebControls"
Namespace="ApplicationFramework.WebControls.Grid"
TagPrefix="xwavegrid" %>
<div style="z-index: 101; left: 1px; width: 541px; position: absolute;
top:
1px;
height: 290px">
<xwavegrid:smartgrid id=smartgrid1 runat="server" style="z-index: 102;
left: 0px; position: absolute; top: 0px">
<FooterStyle Height="20px"></FooterStyle>
<Columns>
<xwavegrid:SmartGridColumn DataField="sdf" AllowClientUpdates="False"
Key="df" ReadOnly="True" ColumnType="Text" Render="True"
IncludeInTotals="False" MaxLength="50" Value="" PrimaryKey="False"
Format=""
Title="Column 0" ClipContents="False" SortExpression="" Visible="True"
IsHyperlink="False" PersistClientUpdatesOnDataBind="False">
<Style Width="100px"></Style>
</xwavegrid:SmartGridColumn>
</Columns>
</xwavegrid:smartgrid>
</div>

I have not added it to page, but I should still be able to switch to
design
view.

Galin iliev said:
No. this is not the problem

see if you have any other style tag

it must be in head section

for instance
<head>

<title>asdasd</title>

<style></style>

</head>


--
Galin Iliev [MCSD, MCSD.NET]
Senior Software Developer
www.wordassist.com

I have converted a vs 2003 solution to 2005 and when I try to switch to
design mode for a user control I get:

Cannot switch views: Validation (Internet Explorer 6): Element 'Style'
cannot be nested within element 'div'

Here is the html:


<div style="z-index: 101; left: 1px; width: 541px; position: absolute;
top:
1px;
height: 290px">
<xwavegrid:smartgrid id="SmartGrid1" runat="server" style="z-index:
100;
left: 0px;
position: absolute; top: 0px">
<FooterStyle Height="20px"></FooterStyle>
<Columns>
<xwavegrid:SmartGridColumn DataField="asdf" AllowClientUpdates="False"
Key="sadf" ReadOnly="True" ColumnType="Text" Render="True"
IncludeInTotals="False" MaxLength="50" Value="" PrimaryKey="False"
Format=""
Title="Column 0" ClipContents="False" SortExpression="" Visible="True"
IsHyperlink="False" PersistClientUpdatesOnDataBind="False">
<Style Width="100px"></Style>
</xwavegrid:SmartGridColumn>
</Columns>

<CaptionStyle Width="100%" Height="20px"></CaptionStyle>

<HeaderStyle Height="20px"></HeaderStyle>

<PagerStyle Width="100%"></PagerStyle>
</xwavegrid:smartgrid>
</div>

As you can see this is a custom webcontrol within a div. The custom
control
has nested controls which have styles. This doesn't seem to be allowed,
any
help appreciated
 
Do you have XHTML enabled on the page. Look for DOCTYPE directive near top
of page and see if it mentions XHTML.
 
changing the doc type to an older version is a good work around for
converted projects
 
This is the entire ascx file content.

<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="WebUserControl.ascx.cs"
Inherits="Test_WebUserControl" %>
<%@ Register Assembly="ApplicationFramework.WebControls"
Namespace="ApplicationFramework.WebControls.Grid"
TagPrefix="xwavegrid" %>
<div style="z-index: 101; left: 1px; width: 541px; position: absolute; top:
1px;
height: 290px">
<xwavegrid:smartgrid id=smartgrid1 runat="server" style="z-index: 102;
left: 0px; position: absolute; top: 0px">
<FooterStyle Height="20px"></FooterStyle>
<Columns>
<xwavegrid:SmartGridColumn DataField="sdf" AllowClientUpdates="False"
Key="df" ReadOnly="True" ColumnType="Text" Render="True"
IncludeInTotals="False" MaxLength="50" Value="" PrimaryKey="False" Format=""
Title="Column 0" ClipContents="False" SortExpression="" Visible="True"
IsHyperlink="False" PersistClientUpdatesOnDataBind="False">
<Style Width="100px"></Style>
</xwavegrid:SmartGridColumn>
</Columns>
</xwavegrid:smartgrid>
</div>

I have not added it to page, but I should still be able to switch to design
view.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top