Design View cause Vistual Studio to crash

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

Guest

I have a default page thet causes Visual Studio to crash when opening it in
design view. I have narrowed it down to the template colum but have no idea
how to prevent this happening. The page compliles and functions correctly.

Here is the ASPX code
<%@ Page language="c#" Codebehind="default.aspx.cs" AutoEventWireup="false"
Inherits="OCS.DefaultPage" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Offce Coffee Order System</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<LINK href="ocs.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<table cellSpacing="2" cellPadding="2" width="740" border="0">
<tr>
<td width="5%"> </td>
<td class="PropGroup">Office Coffee Product Selection
</td>
</tr>
<tr>
<td> </td>
<td class="PropGroup"><b>Client: </b>
<asp:label id="NameIs" Runat="server"></asp:label></td>
</tr>
<tr>
<td> </td>
<td>
<form id="Form1" method="post" runat="server">
<p class="PropGroup">Please select product to order</p>
<asp:datagrid id="ProductsGrid" Runat="server" CssClass="grid"
AutoGenerateColumns="False" CellPadding="2"
BorderWidth="1px">
<FooterStyle CssClass="PropGroup"></FooterStyle>
<AlternatingItemStyle CssClass="gridalternate"></AlternatingItemStyle>
<ItemStyle CssClass="griditem"></ItemStyle>
<HeaderStyle CssClass="PropGroup"></HeaderStyle>
<Columns>
<asp:BoundColumn Visible="False"
DataField="ProductID"></asp:BoundColumn>
<asp:BoundColumn DataField="Description" HeaderText="Product">
<HeaderStyle Width="150px"></HeaderStyle>
</asp:BoundColumn>
<asp:TemplateColumn>
<HeaderStyle Width="50px"></HeaderStyle>
<HeaderTemplate>
<u>Order</u>
</HeaderTemplate>
<ItemTemplate>
<%# setOrder (DataBinder.Eval (Container.DataItem, "ProductID")) %>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
</form>
</td>
</tr>
<tr>
<td> </td>
<td><asp:label id="Output" Runat="server"></asp:label></td>
</tr>
<tr align="center">
<td colSpan="2"><br>
<hr align="center" width="98%" noShade SIZE="1">
<span class="copywright">Copyright © 2004 </span><SPAN
class="copywright"> Office Coffee Systems Design by <a
href="http://www.plum.co.nz">Plum Software Ltd</a>
</SPAN>
<P></P>
</td>
</tr>
</table>
</body>
</HTML>

and here is the function called in the template column
public string setOrder (object ProductID)
{
return "<a href=\"Order.aspx?ProductID=" + ProductID.ToString()+ "\">Add
to basket</a>";
}

any ideas as to what to do?
 
Hi Tim,

In case in helps, your code doesn't crash on my system.

You might want to reinstall VS.NET or call Microsoft Support in case they've
seen this before.

Ken
 
Back
Top