Cant swith to Design view in ASPX file. Is this a bug?

  • Thread starter Thread starter Luis Esteban Valencia
  • Start date Start date
L

Luis Esteban Valencia

Hello I have this code and It runs FINE
but vs.net 2003 doesnt let me switch to design mode

<asp:DataList id="datalistpartidos" runat="server" GridLines="Vertical"
CellPadding="3" BorderWidth="1px"
BorderColor="#999999" BackColor="White" BorderStyle="None">
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#008A8C"></SelectedItemStyle>
<AlternatingItemStyle
BackColor="Gainsboro"></AlternatingItemStyle>
<ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
<ItemTemplate>
<TABLE id="Table6" borderColor="navy" cellSpacing="0"
cellPadding="0" width="300" border="1">
<TR onClick="servOC(<%#
Container.DataItem("idpartido")%>,'/partidos.aspx?idpartido=<%#
Container.DataItem("idpartido")%>','#cad9ea')">
<TD borderColor="#ffffff"><%#
Container.DataItem("nombreequipo1")%></TD>
<TD borderColor="#ffffff"><%#
Container.DataItem("nombreequipo2")%></TD>
<TD borderColor="#ffffff"><%#
Container.DataItem("fecha")%></TD>
<TD borderColor="#ffffff"><%#
Container.DataItem("fechareal")%></TD>
<TD borderColor="#ffffff"><%#
Container.DataItem("horareal")%></TD>
<TD borderColor="#ffffff"></TD>
<TD borderColor="#ffffff"></TD>
</TR>
<TR style="display:none" id='ihtr<%#
Container.DataItem("idpartido")%>'>
<TD borderColor="#ffffff" colSpan="7"><iframe src=""
id='ihif<%# Container.DataItem("idpartido")%>' width="100%"></iframe></TD>
</TR>
</TABLE>
</ItemTemplate>
<FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="#000084"></HeaderStyle>
</asp:DataList>
 
Hi

I can confirm too that when a page contains dynamic binding phrases that
contain quotes - usually vs.net.2003 is having a hard time switching to
design view.

.......'<%# "..." %>'

Eric
 
Design Mode cant be opened. Different values of single quotes inside a block
'<% ... "value" ... %>'

This is spanish translation.
 
By default, only .ASPX is needed for IIS to run it. However, for VS.Net to
open a .ASPX in "design" mode, not html mode, it requires code behind and
resource files of the .ASPX file. Unless you damaged the .ASPX file, but
likely not because you indicated that it is still working.

John
 
try this..

<asp:DataList id="datalistpartidos" runat="server" GridLines="Vertical"
CellPadding="3" BorderWidth="1px"
BorderColor="#999999" BackColor="White" BorderStyle="None">
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#008A8C"></SelectedItemStyle>
<AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
<ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
<ItemTemplate>
<TABLE id="Table6" borderColor="navy" cellSpacing="0" cellPadding="0"
width="300" border="1">
<TR
onClick='servOC("<%#Container.DataItem("idpartido")%>","/partidos.aspx?idpartido=<%#Container.DataItem("idpartido")%>","#cad9ea")'>
<TD borderColor="#ffffff"><%#Container.DataItem("nombreequipo1")%></TD>
<TD borderColor="#ffffff"><%#Container.DataItem("nombreequipo2")%></TD>
<TD borderColor="#ffffff"><%#Container.DataItem("fecha")%></TD>
<TD borderColor="#ffffff"><%#Container.DataItem("fechareal")%></TD>
<TD borderColor="#ffffff"><%#Container.DataItem("horareal")%></TD>
<TD borderColor="#ffffff"></TD>
<TD borderColor="#ffffff"></TD>
</TR>
<TR style="display:none" id='ihtr<%#Container.DataItem("idpartido")%>'>
<TD borderColor="#ffffff" colSpan="7"><iframe src="" id='ihif<%#
Container.DataItem("idpartido")%>' width="100%"></iframe>
</TD>
</TR>
</TABLE>
</ItemTemplate>
<FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="#000084"></HeaderStyle>
</asp:DataList>
 
Hi Luis,

Your problem might be here:

<TR onClick="servOC(<%#
Container.DataItem("idpartido")%>,'/partidos.aspx?idpartido=<%#
Container.DataItem("idpartido")%>','#cad9ea')">

The "idpartido" in the DataItem() is enclosed in quotes. But the entire
onClick code is also enclosed in quotes. So these would either need to be
""idpartido"" or 'idpartido' for it to work. I think. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
 
Back
Top