By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,026 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

Error in converting app from 1.1 to framework 2.0

P: n/a
I keep getting errors that pop up when I am trying to convert an
application from dotnet framework 1.1 to framework 2.0. The old project
was saved in sourcesafe from Visual Studio 2003, and I have opened it in
Visual Studio 2005.

I've cleared up most errors, but have one that beats the heck out of me.

I have a page:

sales/Item.aspx that has several datagrids in it.

<%@ Page Language="vb" AutoEventWireup="true" Inherits="test.Item"
CodeFile="Item.aspx.vb" %>
<HTML>
<HEAD>
</HEAD>
<body bgColor="#c9c7a6">
<DIV align="left">
<form runat="server">
<TABLE id="Table1" height="28" cellSpacing="1" cellPadding="1"
border="0">
<TR>
<TD width="700"><asp:label id="lblTitle" runat="server"
Font-Bold="True" Font-Size="Large" ForeColor="Black"
Width="572px"></asp:label></TD>
<TD><asp:button id="btnReports" onclick="btnReports_OnClick"
runat="server" ForeColor="White" Width="135px" Text="Reports Menu"
BackColor="#214915"></asp:button></TD>
</TR>
</TABLE>
<font color="white">
<TABLE id="Table2" height="25" cellSpacing="1" cellPadding="1"
border="0">
<TR>
<TD><asp:label id="label1" runat="server" Font-Bold="True"
Font-Size="X-Small" ForeColor="Black" Width="554px" BackColor="#C9C7A6"
BorderColor="#C9C7A6"></asp:label></TD>
</TR>
</TABLE>
<TABLE id="Table3" height="44" cellSpacing="1" cellPadding="1"
width="681" border="0">
<TR>
<TD>
<P align="right"><FONT color="black" size="4"><STRONG>Search
Criteria</STRONG></FONT></P>
</TD>
<TD width="165"><asp:textbox id="txtSearch"
runat="server"></asp:textbox></TD>
<TD><asp:button id="btnSearch" onclick="page_load" runat="server"
ForeColor="White" Text="Search" BackColor="#214915"></asp:button></TD>
</TR>
</TABLE>
<P align="center">
</font>
<TABLE id="Table4" cellSpacing="0" cellPadding="0" width="800"
bgColor="#214915" border="0">
<TR>
<TD width="548" bgColor="#214915">
<P align="left"><asp:radiobuttonlist id="rbtnAmmo" runat="server"
Font-Size="Small" ForeColor="White" Width="245px" BackColor="#214915"
Visible="False" AutoPostBack="True" RepeatDirection="Horizontal">
<asp:ListItem Value="Rounds" Selected="True">Units</asp:ListItem>
<asp:ListItem Value="Boxes">Boxes</asp:ListItem>
<asp:ListItem Value="Cases">Cases</asp:ListItem>
</asp:radiobuttonlist><asp:radiobuttonlist id="rbtnSpecial"
runat="server" ForeColor="White" Width="382px" BackColor="#214915"
Visible="False" AutoPostBack="True" RepeatDirection="Horizontal">
<asp:ListItem Value="No" Selected="True">Ship To</asp:ListItem>
<asp:ListItem Value="Sold">Sold To</asp:ListItem>
<asp:ListItem Value="Con">Consolidated</asp:ListItem>
</asp:radiobuttonlist></P>
</TD>
<TD vAlign="bottom" bgColor="#214915">
<P align="right"><asp:radiobuttonlist id="rbtnExceptions"
runat="server" ForeColor="White" BackColor="#214915" Visible="False"
AutoPostBack="True" RepeatDirection="Horizontal">
<asp:ListItem Value="All" Selected="True">WorldWide</asp:ListItem>
<asp:ListItem Value="Samples">Samples</asp:ListItem>
</asp:radiobuttonlist></P>
</TD>
</TR>
</TABLE>
<p align="left">
<asp:datagrid id="DataGrid1" runat="server" Font-Size="X-Small"
Width="800px" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
OnSelectedIndexChanged="DataGrid1_Select" DataKeyField="Product code"
AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3"
EnableViewState="False">
<SelectedItemStyle ForeColor="Black"
BackColor="White"></SelectedItemStyle>
<AlternatingItemStyle BackColor="PapayaWhip"></AlternatingItemStyle>
<ItemStyle ForeColor="#000066" BackColor="Moccasin"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="Black"
BackColor="Gainsboro"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
<Columns>
<asp:ButtonColumn Text="Button" DataTextField="Product Code"
HeaderText="Product Code" CommandName="select"></asp:ButtonColumn>
<asp:BoundColumn Visible="False" DataField="Product Code"
HeaderText="Product Code"></asp:BoundColumn>
<asp:BoundColumn DataField="Material No" HeaderText="Material
#"></asp:BoundColumn>
<asp:BoundColumn DataField="Description"
HeaderText="Description"></asp:BoundColumn>
<asp:BoundColumn DataField="Qty" HeaderText="Qty">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Price" HeaderText="Price"
DataFormatString="{0:C}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="UPC Code" HeaderText="UPC
Code"></asp:BoundColumn>
<asp:BoundColumn DataField="Weight" HeaderText="Weight">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#000066"
BackColor="White" Mode="NumericPages"></PagerStyle>
</asp:datagrid></P>
<P align="left"><asp:datagrid id="DataGrid5" runat="server"
Font-Size="X-Small" Width="800px" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None"
OnSelectedIndexChanged="DataGrid5_Select" DataKeyField="SKU"
AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3"
ShowFooter="True" OnItemDataBound="MyDataGrid_ItemDataBound"
AllowSorting="True" OnSortCommand="DataGrid5_Sort">
<SelectedItemStyle ForeColor="Black"
BackColor="White"></SelectedItemStyle>
<AlternatingItemStyle BackColor="PapayaWhip"></AlternatingItemStyle>
<ItemStyle ForeColor="#000066" BackColor="Moccasin"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="Black"
BackColor="Gainsboro"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="Tan"></FooterStyle>
<Columns>
<asp:ButtonColumn Text="Button" DataTextField="materialnumber"
SortExpression="materialnumber" HeaderText="Material #"
CommandName="select">
<HeaderStyle Width="60px"></HeaderStyle>
<ItemStyle Width="60px"></ItemStyle>
</asp:ButtonColumn>
<asp:BoundColumn Visible="False"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="SKU"
SortExpression="SKU" HeaderText="SKU"></asp:BoundColumn>
<asp:BoundColumn Visible="False"></asp:BoundColumn>
<asp:BoundColumn DataField="productcode"
SortExpression="productcode" HeaderText="Product Code">
<HeaderStyle Width="60px"></HeaderStyle>
<ItemStyle Width="60px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Description"
SortExpression="Description" HeaderText="Description">
<HeaderStyle Width="180px"></HeaderStyle>
<ItemStyle Width="180px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Order Qty" SortExpression="Order Qty"
HeaderText="Order Qty" DataFormatString="{0:n0}">
<HeaderStyle HorizontalAlign="Right" Width="80px"></HeaderStyle>
<ItemStyle HorizontalAlign="Right" Width="80px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Ship Qty" SortExpression="Ship Qty"
HeaderText="Ship Qty" DataFormatString="{0:n0}">
<HeaderStyle HorizontalAlign="Right" Width="80px"></HeaderStyle>
<ItemStyle HorizontalAlign="Right" Width="80px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Open Qty" SortExpression="Open Qty"
HeaderText="Open Qty" DataFormatString="{0:n0}">
<HeaderStyle HorizontalAlign="Right" Width="80px"></HeaderStyle>
<ItemStyle HorizontalAlign="Right" Width="80px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="$-Order" SortExpression="$-Order"
HeaderText="$-Ordered">
<HeaderStyle HorizontalAlign="Right" Width="80px"></HeaderStyle>
<ItemStyle HorizontalAlign="Right" Width="80px"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="$-Ship" SortExpression="$-Ship"
HeaderText="$-Shipped">
<HeaderStyle HorizontalAlign="Right" Width="80px"></HeaderStyle>
<ItemStyle HorizontalAlign="Right" Width="80px"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="$-Open" SortExpression="$-Open"
HeaderText="$-Open">
<HeaderStyle HorizontalAlign="Right" Width="80px"></HeaderStyle>
<ItemStyle HorizontalAlign="Right" Width="80px"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#000066"
BackColor="White" Mode="NumericPages"></PagerStyle>
</asp:datagrid></P>
<P align="left"><asp:datagrid id="DGCustomer" runat="server"
Font-Size="X-Small" Width="800px" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None"
OnSelectedIndexChanged="DGCustomer_Select" DataKeyField="Customer #"
AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3"
AllowSorting="True" OnSortCommand="DGCustomer_Sort">
<SelectedItemStyle ForeColor="Black"
BackColor="White"></SelectedItemStyle>
<AlternatingItemStyle BackColor="PapayaWhip"></AlternatingItemStyle>
<ItemStyle ForeColor="#000066" BackColor="Moccasin"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="Black"
BackColor="Gainsboro"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="Tan"></FooterStyle>
<Columns>
<asp:ButtonColumn Text="button" DataTextField="Sold To Name"
SortExpression="Sold To Name" HeaderText="Sold To Name"
CommandName="Select">
<ItemStyle Width="125px"></ItemStyle>
</asp:ButtonColumn>
<asp:BoundColumn Visible="False" DataField="Customer #"
HeaderText="Customer #"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="Sold To Name"
SortExpression="Sold To Name" HeaderText="Sold To Name"></asp:BoundColumn>
<asp:BoundColumn DataField="Ship To Name" SortExpression="Ship To
Name" HeaderText="Ship To Name"></asp:BoundColumn>
<asp:BoundColumn DataField="Sold To" SortExpression="Sold To"
HeaderText="Sold To"></asp:BoundColumn>
<asp:BoundColumn DataField="Ship To" SortExpression="Ship To"
HeaderText="Ship To"></asp:BoundColumn>
<asp:BoundColumn DataField="Channel" SortExpression="Channel"
HeaderText="DC"></asp:BoundColumn>
<asp:BoundColumn DataField="Sales Group" SortExpression="Sales
Group" HeaderText="Sales Group"></asp:BoundColumn>
<asp:BoundColumn DataField="Sales Rep" SortExpression="Sales Rep"
HeaderText="Sales Rep"></asp:BoundColumn>
<asp:BoundColumn DataField="Address" SortExpression="Address"
HeaderText="Address"></asp:BoundColumn>
<asp:BoundColumn DataField="Phone Number" SortExpression="Phone
Number" HeaderText="Phone Number"></asp:BoundColumn>
<asp:BoundColumn DataField="Contact Name" SortExpression="Contact
Name" HeaderText="Contact Name"></asp:BoundColumn>
<asp:BoundColumn DataField="Contact Phone"
SortExpression="Contact Phone" HeaderText="Contact #"></asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#000066"
BackColor="White" Mode="NumericPages"></PagerStyle>
</asp:datagrid></P>
<P align="left"><asp:datagrid id="DGPOClass" runat="server"
Font-Size="X-Small" BackColor="White" BorderColor="#CCCCCC"
BorderStyle="None" OnSelectedIndexChanged="DGPOClass_Select"
DataKeyField="Class" AutoGenerateColumns="False" BorderWidth="1px"
CellPadding="3" ShowFooter="True"
OnItemDataBound="MyDataGrid_ItemDataBound1" width="800px"
OnPageIndexChanged="DGPOClass_Page" PageSize="6">
<SelectedItemStyle ForeColor="Black"
BackColor="White"></SelectedItemStyle>
<AlternatingItemStyle BackColor="PapayaWhip"></AlternatingItemStyle>
<ItemStyle ForeColor="#000066" BackColor="Moccasin"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="Black"
BackColor="Gainsboro"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="Tan"></FooterStyle>
<Columns>
<asp:ButtonColumn DataTextField="class" HeaderText="PO
Classification" CommandName="Select">
<HeaderStyle Wrap="False"></HeaderStyle>
<ItemStyle Width="125px"></ItemStyle>
</asp:ButtonColumn>
<asp:BoundColumn Visible="False" DataField="class"
HeaderText="Class">
<HeaderStyle Wrap="False"></HeaderStyle>
<ItemStyle Width="160px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn Visible="False"></asp:BoundColumn>
<asp:BoundColumn Visible="False"></asp:BoundColumn>
<asp:BoundColumn Visible="False"></asp:BoundColumn>
<asp:BoundColumn DataField="Orders" HeaderText="# ">
<HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right" Width="80px"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="orderval" HeaderText="$-Ordered">
<HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="shipval" HeaderText="$-Shipped">
<HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="openval" HeaderText="$-Open">
<HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="assigned" HeaderText="$-Assigned">
<HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="unassigned" HeaderText="$-Unassigned">
<HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#000066"
BackColor="White" Mode="NumericPages"></PagerStyle>
</asp:datagrid></P>
<P align="left"><asp:datagrid id="DGPOList" runat="server"
Font-Size="X-Small" BackColor="White" BorderColor="#CCCCCC"
BorderStyle="None" OnSelectedIndexChanged="DGPOList_Select"
DataKeyField="ponr" AutoGenerateColumns="False" BorderWidth="1px"
CellPadding="3" ShowFooter="True"
OnItemDataBound="MyDataGrid_ItemDataBound1" AllowSorting="True"
OnSortCommand="DGPOList_Sort" width="800px"
OnPageIndexChanged="DGPOClass_Page" PageSize="6">
<SelectedItemStyle ForeColor="Black"
BackColor="White"></SelectedItemStyle>
<AlternatingItemStyle BackColor="PapayaWhip"></AlternatingItemStyle>
<ItemStyle ForeColor="#000066" BackColor="Moccasin"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="Black"
BackColor="Gainsboro"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="Tan"></FooterStyle>
<Columns>
<asp:ButtonColumn Text="button" DataTextField="ponr"
SortExpression="ponr" HeaderText="PO #" CommandName="Select">
<HeaderStyle Wrap="False"></HeaderStyle>
<ItemStyle Width="125px"></ItemStyle>
</asp:ButtonColumn>
<asp:BoundColumn DataField="Order-dt" SortExpression="Order-dt"
HeaderText="Order Date"></asp:BoundColumn>
<asp:BoundColumn DataField="rdd" SortExpression="rdd"
HeaderText="Req'd Delv Date"></asp:BoundColumn>
<asp:BoundColumn DataField="Last Ship-Dt" SortExpression="Last
Ship-Dt" HeaderText="Last Ship Date">
<ItemStyle Width="80px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="LastInvoice"
SortExpression="LastInvoice" HeaderText="Last Invoice #"></asp:BoundColumn>
<asp:BoundColumn DataField="shipments" SortExpression="shipments"
HeaderText="#">
<HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="orderval" SortExpression="orderval"
HeaderText="$-Ordered">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="shipval" SortExpression="shipval"
HeaderText="$-Shipped">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="openval" SortExpression="openval"
HeaderText="$-Open">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="assigned" SortExpression="assigned"
HeaderText="$-Assigned">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="unassigned"
SortExpression="unassigned" HeaderText="$-Unassigned">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<FooterStyle HorizontalAlign="Right"></FooterStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#000066"
BackColor="White" Mode="NumericPages"></PagerStyle>
</asp:datagrid></P>
<DIV align="left"><asp:datagrid id="DGBOL" runat="server"
Font-Size="X-Small" Width="800px" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" AutoGenerateColumns="False"
BorderWidth="1px" CellPadding="3">
<SelectedItemStyle ForeColor="White"
BackColor="#669999"></SelectedItemStyle>
<ItemStyle ForeColor="#000066"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="Black"
BackColor="Gainsboro"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
<Columns>
<asp:BoundColumn DataField="bill_of_lading" HeaderText="Bill Of
Lading"></asp:BoundColumn>
<asp:BoundColumn DataField="pro_number" HeaderText="Pro
#"></asp:BoundColumn>
<asp:BoundColumn DataField="carrier_id"
HeaderText="Carrier"></asp:BoundColumn>
<asp:BoundColumn DataField="committed_qty" HeaderText="Assigned
Qty" DataFormatString="{0:#,###}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="committed_val" HeaderText="Assigned
Val" DataFormatString="{0:c0}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="delv_note_qty"
HeaderText="Delv Note Qty">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="delv_note_val"
HeaderText="Delv Note Val">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#000066"
BackColor="White" Mode="NumericPages"></PagerStyle>
</asp:datagrid></DIV>
<DIV align="center">&nbsp;</DIV>
<DIV align="left">&nbsp;
<asp:literal id="MyPage" runat="server"></asp:literal></DIV>
<H2 align="center"><asp:label id="lblErrorMsg" runat="server"
Visible="False">DESC</asp:label>&nbsp;
<asp:textbox id="txtSoldTo" runat="server" Width="16px"
Visible="False"></asp:textbox>&nbsp;&nbsp;
<asp:textbox id="txtShipTo" runat="server" Width="16px"
Visible="False"></asp:textbox><asp:textbox id="txtDC" runat="server"
Width="16px" Visible="False"></asp:textbox><asp:textbox id="txtDG1"
runat="server" Width="148px" Visible="False"></asp:textbox><asp:textbox
id="TxtDG2" runat="server" Width="97px"
Visible="False"></asp:textbox><asp:textbox id="txtDGCustomer"
runat="server" Width="75px" Visible="False"></asp:textbox><asp:textbox
id="TxtDG4" runat="server" Width="181px"
Visible="False"></asp:textbox><asp:textbox id="TxtDG3" runat="server"
Width="22px" Visible="False"></asp:textbox><asp:textbox id="txtDG5"
runat="server" Width="181px" Visible="False"></asp:textbox><asp:textbox
id="txtDG6" runat="server" Width="181px"
Visible="False"></asp:textbox><FONT color="white"><asp:textbox
id="txtDGPOList" runat="server" Width="181px"
Visible="False"></asp:textbox><asp:label id="lblPO" runat="server"
ForeColor="Black" BackColor="White"
Visible="False">PO's</asp:label>&nbsp;</FONT>
<asp:dropdownlist id="cmbPO" runat="server"
OnSelectedIndexChanged="cmbPO_SelectedIndexChanged " Visible="False"
DataTextField="pon"
DataValueField="po"></asp:dropdownlist>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;
<asp:textbox id="txtPO" runat="server"
Visible="False"></asp:textbox>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:button id="btnSubmit" onclick="btnSubmit_Click" runat="server"
ForeColor="White" Text="Submit" BackColor="#006699"
Visible="False"></asp:button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;
<asp:button id="Button1" onclick="btnReports_OnClick"
runat="server" Text="Reports Menu"
Visible="False"></asp:button><asp:textbox id="Textbox1" runat="server"
Visible="False"></asp:textbox></H2>
<P align="center"></P>
</form>
</DIV>
<!-- Insert content here -->
</body>
</HTML>
In Visual Studio 2005, on the Solution Explorer, I have a Sales folder
and under that, I show Item.aspx with a plus sign next to it. If I
click the plus sign, Item.aspx.vb. If I open Item.aspx, and click "View
Code" it opens the Item.aspx.vb codefile.

However, the errors that I get when I try to compile the application are:

'DataGrid5_Sort' is not a member of 'ASP.sales_item_aspx'.
'MyDataGrid_ItemDataBound' is not a member of 'ASP.sales_item_aspx'
'DataGrid5_Select' is not a member of 'ASP.sales_item_aspx'.

and so on.

I've looked for this error message, and it says that it may be some
references to 1.1 framework in there, but I've not been able to find them.

This has frustrated me to no end the last 4 days, and every time I think
I have found the problem, nothing fixes it.

Anyone have any idea why this is doing this? All the errors are in 1
page in the entire application, but I have a sinking feeling that as
soon as I fix these, there will be a dozen more errors to take their place.

Any advice, suggestions appreciated.

BC
May 8 '07 #1
Share this Question
Share on Google+
25 Replies


P: n/a
Change ASP to test. see if that works.
HTH
May 8 '07 #2

P: n/a
That's just it - I can't find "ASP." anything anywhere in the entire
project.

I can't figure out where it's generating the error messages from.

It's like the codefile and the aspx page are not associated with each
other, but they appear to be.
BC

Vijay wrote:
Change ASP to test. see if that works.
HTH
May 8 '07 #3

P: n/a
You have to look at the root namespace for the project and change it to 'test'.
May 8 '07 #4

P: n/a
Is that something that was created when I ran the conversion wizard to
change it from Visual Studio 2003 to Visual Studio 2005 & ASP Framework 2.0?

If so, I haven't been able to find that piece of code.

Too - I have no idea why this one page, whose header is identical to 30
other pages in the application - is causing a problem with those error
messages.

Can you give me any guidance on the Root Namespace?

Vijay wrote:
You have to look at the root namespace for the project and change it to 'test'.
May 8 '07 #5

P: n/a
Right click on project, click properties, application tab, what do you see
under 'default namespace'? if it's ASP then that is the problem.
May 8 '07 #6

P: n/a
I'm not seeing what you are describing.

In the main part of the page, I see the code pages. On the right hand
side I see "Solution Explorer" where it has Solution'Test (1 project)
and underneath that, I see http://localhost/test and then under that, I
see a bunch of folders.

If I click on Solution 'Test' and go to properties, I don't get a page
with tabs on it. I get "Solution 'test' Property Pages" with Common
Properties (Startup Project, Project Dependencies and Debug Source Files
underneath it), and Configuration Properties (with Configuration
underneath it). None of what you describe.

Right clicking & going to properties on the node "http://localhost/test"
I get no tabs, but some menu items: References, Build, Accessibility,
Start Options and MSBuild Options. No application tab anywhere.

Am I even looking in the right place?

BC

Vijay wrote:
Right click on project, click properties, application tab, what do you see
under 'default namespace'? if it's ASP then that is the problem.
May 8 '07 #7

P: n/a
Ok, if this is the only file causing the issue, then you might want to change
this line Inherits="test.Item" at the very top of your code to
Inherits="ASP.Item"

If that doesn't work, just rewrite the grid code in 2.0

HTH

May 8 '07 #8

P: n/a
I've done that already & none of those things make the error go away.

I've even deleted the pages (the aspx & aspx.vb pages), re-created them
and then put back in the old code, that still hasn't fixed the problem.
For instance, when I deleted the old Item.aspx page, I re-created it,
and put in the old code from the original, starting with the <bodytag.
With the aspx.vb page, I put in everything below the page load, and
then started re-adding everything else as the errors would hit when I'd
code. However, once I got all the errors removed from the .vb page, the
ones saying

'DataGrid5_Sort' is not a member of 'ASP.sales_item_aspx'
I am completely lost on this thing. I've not been able to find
ASP.sales_item_aspx anywhere in the code, nor have I been able to find
the property tab you referred to.


Vijay wrote:
Ok, if this is the only file causing the issue, then you might want to change
this line Inherits="test.Item" at the very top of your code to
Inherits="ASP.Item"

If that doesn't work, just rewrite the grid code in 2.0

HTH
May 8 '07 #9

P: n/a
I was referring to Visual Studio 2005. You are referring to 2003. anyway, why
don't you try my last suggestion of renaming test to asp in that file that's
causing the issue.
May 8 '07 #10

P: n/a
I'm using Visual Studio 2005 - Version 8.0.50727.42. The Product
Details say Microsoft Visual Web Developer 2005.

I tried your suggestion of naming test to asp in the offending file, but
that didn't work. Once I do that, it tells me that none of the
variables in the .vb codefile are defined.
BC

Vijay wrote:
I was referring to Visual Studio 2005. You are referring to 2003. anyway, why
don't you try my last suggestion of renaming test to asp in that file that's
causing the issue.
May 8 '07 #11

P: n/a
You are right-clicking on the solution instead of on the project. right-click
on the project -properties ->application-you will root namespace field.
whats the value there? play with changing this. It still you have an issue
then create a new .net 2.0 project and just recreate them.
May 8 '07 #12

P: n/a
I must have something configured wrong or something, but I am not seeing
what you are describing. Nowhere on the page can I right-click and get
the property boxes you're describing.

What I am seeing is here:

http://ws10.ipowerweb.com/chathamf/m...studio2005.jpg

The only place I can see that I can right click on the project (and NOT
the solution) is on the start page, and that right click does nothing.

What am I doing wrong?
BC
Vijay wrote:
You are right-clicking on the solution instead of on the project. right-click
on the project -properties ->application-you will root namespace field.
whats the value there? play with changing this. It still you have an issue
then create a new .net 2.0 project and just recreate them.

May 9 '07 #13

P: n/a
"Blasting Cap" <go****@christian.netwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>I must have something configured wrong or something, but I am not seeing
what you are describing. Nowhere on the page can I right-click and get the
property boxes you're describing.

What I am seeing is here:

http://ws10.ipowerweb.com/chathamf/m...studio2005.jpg

The only place I can see that I can right click on the project (and NOT
the solution) is on the start page, and that right click does nothing.

What am I doing wrong?
A question to Blasting Cap and to Vijay?

Which product are you using? Web Developer? C# Express? Are you using a Web
Site, or a Web Application Project?

I bet you're using different things.
--
John Saunders [MVP]
May 9 '07 #14

P: n/a
John:
I'm using Microsoft Visual Studio 2005 Professional Edition.

Under Product Details it says "Microsoft Visual Web Developer 2005".

Mine is also .net framework 2.050727, the version on Visual studio 2005
is 8.0.50727.42

BC

John Saunders [MVP] wrote:
"Blasting Cap" <go****@christian.netwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>I must have something configured wrong or something, but I am not seeing
what you are describing. Nowhere on the page can I right-click and get the
property boxes you're describing.

What I am seeing is here:

http://ws10.ipowerweb.com/chathamf/m...studio2005.jpg

The only place I can see that I can right click on the project (and NOT
the solution) is on the start page, and that right click does nothing.

What am I doing wrong?

A question to Blasting Cap and to Vijay?

Which product are you using? Web Developer? C# Express? Are you using a Web
Site, or a Web Application Project?

I bet you're using different things.
May 9 '07 #15

P: n/a
"Blasting Cap" <go****@christian.netwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
John:
I'm using Microsoft Visual Studio 2005 Professional Edition.

Under Product Details it says "Microsoft Visual Web Developer 2005".

Mine is also .net framework 2.050727, the version on Visual studio 2005 is
8.0.50727.42
Ok, but is this a web site, ir is it a Web Application project?
--
John Saunders [MVP]
May 9 '07 #16

P: n/a
It is a web site. The page that's offending is a single web page out of
35-40 other pages that compile just fine.

BC

John Saunders [MVP] wrote:
"Blasting Cap" <go****@christian.netwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
>John:
I'm using Microsoft Visual Studio 2005 Professional Edition.

Under Product Details it says "Microsoft Visual Web Developer 2005".

Mine is also .net framework 2.050727, the version on Visual studio 2005 is
8.0.50727.42

Ok, but is this a web site, ir is it a Web Application project?
May 10 '07 #17

P: n/a
"Blasting Cap" <go****@christian.netwrote in message
news:ei**************@TK2MSFTNGP05.phx.gbl...
It is a web site. The page that's offending is a single web page out of
35-40 other pages that compile just fine.
I'm guessing that this is why you're not seeing what the other poster saw.
Perhaps he was using a Web Application Project.
--
John Saunders [MVP]
May 10 '07 #18

P: n/a
Any idea as to what is causing the problem?

I've created a new page, pasted the stuff between the <bodyand </body>
tags into it, and it gives me the same error with the new page. Pasted
in all the code behind too, and it gives no errors, but still won't
build the page.

This page is working on a production site using framework 1.1 (I am
converting to 2.0).

BC



John Saunders [MVP] wrote:
"Blasting Cap" <go****@christian.netwrote in message
news:ei**************@TK2MSFTNGP05.phx.gbl...
>It is a web site. The page that's offending is a single web page out of
35-40 other pages that compile just fine.

I'm guessing that this is why you're not seeing what the other poster saw.
Perhaps he was using a Web Application Project.
May 10 '07 #19

P: n/a
Hi.

To recap :

You've got a basic 1.1 page with code-behind
which fails when converted to 2.0, right ?

Have you changed the class definition to partial classes ?

You should have something like this :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

....and, in the codebehind file :

namespace YourNameSpace
{
public partial class _Default : System.Web.UI.Page
{
//etc...

In 1.1, you'd have something like :

<%@ Page Language="C#" AutoEventWireup="false" Codebehind="Default.aspx.cs"
Inherits="ApplicationName.Default"%>

....and, in the codebehind file :

public class Default : System.Web.UI.Page

Notice the difference in "CodeBehind vs. CodeFile" syntax,
in the partial class definition, and in the default AutoEventWireup attribute.

Which model do you currently have ?

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Blasting Cap" <go****@christian.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Any idea as to what is causing the problem?

I've created a new page, pasted the stuff between the <bodyand </bodytags into it, and it
gives me the same error with the new page. Pasted in all the code behind too, and it gives no
errors, but still won't build the page.

This page is working on a production site using framework 1.1 (I am converting to 2.0).

BC



John Saunders [MVP] wrote:
>"Blasting Cap" <go****@christian.netwrote in message
news:ei**************@TK2MSFTNGP05.phx.gbl...
>>It is a web site. The page that's offending is a single web page out of 35-40 other pages that
compile just fine.

I'm guessing that this is why you're not seeing what the other poster saw. Perhaps he was using a
Web Application Project.

May 10 '07 #20

P: n/a
Juan:

That is correct - I am trying to convert a 1.1 app to 2.0, and seem to
have one page that continually fails.

The error messages I get are (all of this is in the ASPX I've posted
previously):

'Datagrid5_Sort' is not a member of 'ASP.sales_item_aspx'
'MyDatagrid_ItemDataBound' is not a member of 'ASP.sales_item_aspx'
'Datagrid5_select' is not a member of 'ASP.sales_item_aspx'.
'DGCustomer_sort' is not a member of 'ASP.sales_item_aspx'.

and so on.

I've created a new page (adding it to my sales folder in the
application), and pasted the stuff between the BODY tags on the Aspx
page in it, and pasted everything from the Page Load on from the aspx.vb
page into the new one & still get the errors.

Other pages that do sorts on the datagrid will build just fine.

In the ones causing the problem, the first line of the aspx page is:

<%@ Page Language="vb" AutoEventWireup="false" Inherits="test.Item"
enableViewState="True" CodeFile="Item.aspx.vb" %>

The aspx.vb/codefile has in it (this is everything above the Page Load
section):
Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
Imports System.Data
Imports System.Text

'Partial Class Sales_Item
' Inherits System.Web.UI.Page

'End Class

Namespace test

Public Class Item
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub
InitializeComponent()

End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
Dim strName As String
Dim nbrpos As Double
Dim orderqty As Double
Dim shipqty As Double
Dim sBol(5) As String
Dim sCarrier(5) As String
Dim orderval As Double
Dim shipval As Double
Dim sOrg As String = "0"
Dim sRegion As String = "0"
Dim sRep As String = "0"
'dim sDC as string = "0"
Dim sRestrict As String
Dim sAmmo As String
Dim sSold As String
Dim sShip As String
Dim sDCs As String
One of the other pages (with a sortable datagrid) that will build fine -
the first line of the aspx page has:

<%@ Page Language="VB" AutoEventWireup="false"
Inherits="test.ProgramSummary" enableViewState="True"
CodeFile="ProgramSummary.aspx.vb" %>

Everything above the Page Load in it is:

Imports System.Data.OleDb
Imports System.Data
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
'Imports System.Net.Mail
Imports System.Web.Mail
Imports System.Text
Namespace test
Partial Class ProgramSummary

Inherits System.Web.UI.Page


#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub
InitializeComponent()

End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
I even thought the first statement on the datagrid might be a problem.
This one works:

<asp:datagrid id="Datagrid2" runat="server" ToolTip="Program Summary"
Width="100%" AllowSorting="True"
OnItemDataBound="mydatagrid_itemdatabound" ShowFooter="True"
AutoGenerateColumns="False" OnSortCommand="SortCommand_OnClick"
Font-Size="Small">

this one does not:

<asp:datagrid id="DataGrid5" runat="server" Font-Size="X-Small"
Width="800px" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
OnSelectedIndexChanged="DataGrid5_Select" DataKeyField="SKU"
AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3"
ShowFooter="True" OnItemDataBound="MyDataGrid_ItemDataBound"
AllowSorting="True" OnSortCommand="DataGrid5_Sort">
BC
Juan T. Llibre wrote:
Hi.

To recap :

You've got a basic 1.1 page with code-behind
which fails when converted to 2.0, right ?

Have you changed the class definition to partial classes ?

You should have something like this :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

...and, in the codebehind file :

namespace YourNameSpace
{
public partial class _Default : System.Web.UI.Page
{
//etc...

In 1.1, you'd have something like :

<%@ Page Language="C#" AutoEventWireup="false" Codebehind="Default.aspx.cs"
Inherits="ApplicationName.Default"%>

...and, in the codebehind file :

public class Default : System.Web.UI.Page

Notice the difference in "CodeBehind vs. CodeFile" syntax,
in the partial class definition, and in the default AutoEventWireup attribute.

Which model do you currently have ?

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Blasting Cap" <go****@christian.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>Any idea as to what is causing the problem?

I've created a new page, pasted the stuff between the <bodyand </bodytags into it, and it
gives me the same error with the new page. Pasted in all the code behind too, and it gives no
errors, but still won't build the page.

This page is working on a production site using framework 1.1 (I am converting to 2.0).

BC



John Saunders [MVP] wrote:
>>"Blasting Cap" <go****@christian.netwrote in message
news:ei**************@TK2MSFTNGP05.phx.gbl...
It is a web site. The page that's offending is a single web page out of 35-40 other pages that
compile just fine.
I'm guessing that this is why you're not seeing what the other poster saw. Perhaps he was using a
Web Application Project.

May 11 '07 #21

P: n/a
Try changing :

Namespace test
Public Class Item
Inherits System.Web.UI.Page

to :

Namespace test
Partial Class Item
Inherits System.Web.UI.Page
' rest of the code...
End Class ' this "End Class" is important, too!

The rest looks good to go.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Blasting Cap" <go****@christian.netwrote in message news:uR**************@TK2MSFTNGP02.phx.gbl...
Juan:

That is correct - I am trying to convert a 1.1 app to 2.0, and seem to have one page that
continually fails.

The error messages I get are (all of this is in the ASPX I've posted previously):

'Datagrid5_Sort' is not a member of 'ASP.sales_item_aspx'
'MyDatagrid_ItemDataBound' is not a member of 'ASP.sales_item_aspx'
'Datagrid5_select' is not a member of 'ASP.sales_item_aspx'.
'DGCustomer_sort' is not a member of 'ASP.sales_item_aspx'.

and so on.

I've created a new page (adding it to my sales folder in the application), and pasted the stuff
between the BODY tags on the Aspx page in it, and pasted everything from the Page Load on from the
aspx.vb page into the new one & still get the errors.

Other pages that do sorts on the datagrid will build just fine.

In the ones causing the problem, the first line of the aspx page is:

<%@ Page Language="vb" AutoEventWireup="false" Inherits="test.Item" enableViewState="True"
CodeFile="Item.aspx.vb" %>

The aspx.vb/codefile has in it (this is everything above the Page Load section):
Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
Imports System.Data
Imports System.Text

'Partial Class Sales_Item
' Inherits System.Web.UI.Page

'End Class

Namespace test

Public Class Item
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()

End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
Dim strName As String
Dim nbrpos As Double
Dim orderqty As Double
Dim shipqty As Double
Dim sBol(5) As String
Dim sCarrier(5) As String
Dim orderval As Double
Dim shipval As Double
Dim sOrg As String = "0"
Dim sRegion As String = "0"
Dim sRep As String = "0"
'dim sDC as string = "0"
Dim sRestrict As String
Dim sAmmo As String
Dim sSold As String
Dim sShip As String
Dim sDCs As String
One of the other pages (with a sortable datagrid) that will build fine - the first line of the
aspx page has:

<%@ Page Language="VB" AutoEventWireup="false" Inherits="test.ProgramSummary"
enableViewState="True" CodeFile="ProgramSummary.aspx.vb" %>

Everything above the Page Load in it is:

Imports System.Data.OleDb
Imports System.Data
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
'Imports System.Net.Mail
Imports System.Web.Mail
Imports System.Text
Namespace test
Partial Class ProgramSummary

Inherits System.Web.UI.Page


#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()

End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
I even thought the first statement on the datagrid might be a problem. This one works:

<asp:datagrid id="Datagrid2" runat="server" ToolTip="Program Summary" Width="100%"
AllowSorting="True" OnItemDataBound="mydatagrid_itemdatabound" ShowFooter="True"
AutoGenerateColumns="False" OnSortCommand="SortCommand_OnClick" Font-Size="Small">

this one does not:

<asp:datagrid id="DataGrid5" runat="server" Font-Size="X-Small" Width="800px" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" OnSelectedIndexChanged="DataGrid5_Select"
DataKeyField="SKU" AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3" ShowFooter="True"
OnItemDataBound="MyDataGrid_ItemDataBound" AllowSorting="True" OnSortCommand="DataGrid5_Sort">
BC
Juan T. Llibre wrote:
>Hi.

To recap :

You've got a basic 1.1 page with code-behind
which fails when converted to 2.0, right ?

Have you changed the class definition to partial classes ?

You should have something like this :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

...and, in the codebehind file :

namespace YourNameSpace
{
public partial class _Default : System.Web.UI.Page
{
//etc...

In 1.1, you'd have something like :

<%@ Page Language="C#" AutoEventWireup="false" Codebehind="Default.aspx.cs"
Inherits="ApplicationName.Default"%>

...and, in the codebehind file :

public class Default : System.Web.UI.Page

Notice the difference in "CodeBehind vs. CodeFile" syntax,
in the partial class definition, and in the default AutoEventWireup attribute.

Which model do you currently have ?

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Blasting Cap" <go****@christian.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>>Any idea as to what is causing the problem?

I've created a new page, pasted the stuff between the <bodyand </bodytags into it, and it
gives me the same error with the new page. Pasted in all the code behind too, and it gives no
errors, but still won't build the page.

This page is working on a production site using framework 1.1 (I am converting to 2.0).

BC



John Saunders [MVP] wrote:
"Blasting Cap" <go****@christian.netwrote in message
news:ei**************@TK2MSFTNGP05.phx.gbl...
It is a web site. The page that's offending is a single web page out of 35-40 other pages
that compile just fine.
I'm guessing that this is why you're not seeing what the other poster saw. Perhaps he was using
a Web Application Project.
May 11 '07 #22

P: n/a
Juan:

I changed the page, and made your suggested changes. However, when I go
to build Page, it still returns those same 9 errors.
Error 1 'DataGrid5_Sort' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85
Error 2 'MyDataGrid_ItemDataBound' is not a member of
'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85
Error 3 'DataGrid5_Select' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85
Error 4 'DGCustomer_Sort' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 136
Error 5 'DGCustomer_Select' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 136
Error 6 'DGPOClass_Select' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 161
Error 7 'DGPOList_Sort' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 212
Error 8 'DGPOList_Select' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 212
Error 9 'cmbPO_SelectedIndexChanged' is not a member of
'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 292
(FYI - I have created a new page & pasted the Item code in this one and
am simply trying to build the page).

Line 85 above is:

<asp:datagrid id="DataGrid5" runat="server" Font-Size="X-Small"
Width="800px" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
OnSelectedIndexChanged="DataGrid5_Select" DataKeyField="SKU"
AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3"
ShowFooter="True" OnItemDataBound="MyDataGrid_ItemDataBound"
AllowSorting="True" OnSortCommand="DataGrid5_Sort">
Any idea as to why this won't build?

BC

Juan T. Llibre wrote:
Try changing :

Namespace test
Public Class Item
Inherits System.Web.UI.Page

to :

Namespace test
Partial Class Item
Inherits System.Web.UI.Page
' rest of the code...
End Class ' this "End Class" is important, too!

The rest looks good to go.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Blasting Cap" <go****@christian.netwrote in message news:uR**************@TK2MSFTNGP02.phx.gbl...
>Juan:

That is correct - I am trying to convert a 1.1 app to 2.0, and seem to have one page that
continually fails.

The error messages I get are (all of this is in the ASPX I've posted previously):

'Datagrid5_Sort' is not a member of 'ASP.sales_item_aspx'
'MyDatagrid_ItemDataBound' is not a member of 'ASP.sales_item_aspx'
'Datagrid5_select' is not a member of 'ASP.sales_item_aspx'.
'DGCustomer_sort' is not a member of 'ASP.sales_item_aspx'.

and so on.

I've created a new page (adding it to my sales folder in the application), and pasted the stuff
between the BODY tags on the Aspx page in it, and pasted everything from the Page Load on from the
aspx.vb page into the new one & still get the errors.

Other pages that do sorts on the datagrid will build just fine.

In the ones causing the problem, the first line of the aspx page is:

<%@ Page Language="vb" AutoEventWireup="false" Inherits="test.Item" enableViewState="True"
CodeFile="Item.aspx.vb" %>

The aspx.vb/codefile has in it (this is everything above the Page Load section):
Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
Imports System.Data
Imports System.Text

'Partial Class Sales_Item
' Inherits System.Web.UI.Page

'End Class

Namespace test

Public Class Item
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()

End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
Dim strName As String
Dim nbrpos As Double
Dim orderqty As Double
Dim shipqty As Double
Dim sBol(5) As String
Dim sCarrier(5) As String
Dim orderval As Double
Dim shipval As Double
Dim sOrg As String = "0"
Dim sRegion As String = "0"
Dim sRep As String = "0"
'dim sDC as string = "0"
Dim sRestrict As String
Dim sAmmo As String
Dim sSold As String
Dim sShip As String
Dim sDCs As String
One of the other pages (with a sortable datagrid) that will build fine - the first line of the
aspx page has:

<%@ Page Language="VB" AutoEventWireup="false" Inherits="test.ProgramSummary"
enableViewState="True" CodeFile="ProgramSummary.aspx.vb" %>

Everything above the Page Load in it is:

Imports System.Data.OleDb
Imports System.Data
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
'Imports System.Net.Mail
Imports System.Web.Mail
Imports System.Text
Namespace test
Partial Class ProgramSummary

Inherits System.Web.UI.Page


#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()

End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
I even thought the first statement on the datagrid might be a problem. This one works:

<asp:datagrid id="Datagrid2" runat="server" ToolTip="Program Summary" Width="100%"
AllowSorting="True" OnItemDataBound="mydatagrid_itemdatabound" ShowFooter="True"
AutoGenerateColumns="False" OnSortCommand="SortCommand_OnClick" Font-Size="Small">

this one does not:

<asp:datagrid id="DataGrid5" runat="server" Font-Size="X-Small" Width="800px" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" OnSelectedIndexChanged="DataGrid5_Select"
DataKeyField="SKU" AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3" ShowFooter="True"
OnItemDataBound="MyDataGrid_ItemDataBound" AllowSorting="True" OnSortCommand="DataGrid5_Sort">
BC
Juan T. Llibre wrote:
>>Hi.

To recap :

You've got a basic 1.1 page with code-behind
which fails when converted to 2.0, right ?

Have you changed the class definition to partial classes ?

You should have something like this :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

...and, in the codebehind file :

namespace YourNameSpace
{
public partial class _Default : System.Web.UI.Page
{
//etc...

In 1.1, you'd have something like :

<%@ Page Language="C#" AutoEventWireup="false" Codebehind="Default.aspx.cs"
Inherits="ApplicationName.Default"%>

...and, in the codebehind file :

public class Default : System.Web.UI.Page

Notice the difference in "CodeBehind vs. CodeFile" syntax,
in the partial class definition, and in the default AutoEventWireup attribute.

Which model do you currently have ?

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Blasting Cap" <go****@christian.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl.. .
Any idea as to what is causing the problem?

I've created a new page, pasted the stuff between the <bodyand </bodytags into it, and it
gives me the same error with the new page. Pasted in all the code behind too, and it gives no
errors, but still won't build the page.

This page is working on a production site using framework 1.1 (I am converting to 2.0).

BC



John Saunders [MVP] wrote:
"Blasting Cap" <go****@christian.netwrote in message
news:ei**************@TK2MSFTNGP05.phx.gbl.. .
>It is a web site. The page that's offending is a single web page out of 35-40 other pages
>that compile just fine.
I'm guessing that this is why you're not seeing what the other poster saw. Perhaps he was using
a Web Application Project.
May 11 '07 #23

P: n/a
There is no real valid reason to use the DataGrid in ASP.NET 2.0.
You should use the GridView control instead.

Notice that in the ASP.NET 2.0 Data Controls tutorial, the DataGrid isn't even listed:
http://quickstarts.asp.net/QuickStar...a/default.aspx

Read this MSDN article and learn to use the new ASP.NET 2.0 Gridview control :

http://msdn2.microsoft.com/en-us/lib...ew(VS.80).aspx

The GridView control automates many tasks which had to be hand-coded in the DataGrid.

There's additional examples which show you how to use the GridView here :
http://quickstarts.asp.net/QuickStar.../gridview.aspx

Try it. You'll be glad you did.

Just create the GridView...and recycle your SQL statement, setting any other options you like/want.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Blasting Cap" <go****@christian.netwrote in message news:eR**************@TK2MSFTNGP02.phx.gbl...
Juan:

I changed the page, and made your suggested changes. However, when I go to build Page, it still
returns those same 9 errors.
Error 1 'DataGrid5_Sort' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85 Error 2 'MyDataGrid_ItemDataBound' is not a member of
'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85 Error 3 'DataGrid5_Select' is not
a member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85 Error 4
'DGCustomer_Sort' is not a member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx
136 Error 5 'DGCustomer_Select' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 136 Error 6 'DGPOClass_Select' is not a member of
'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 161 Error 7 'DGPOList_Sort' is not a
member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 212 Error 8
'DGPOList_Select' is not a member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx
212 Error 9 'cmbPO_SelectedIndexChanged' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 292

(FYI - I have created a new page & pasted the Item code in this one and am simply trying to build
the page).

Line 85 above is:

<asp:datagrid id="DataGrid5" runat="server" Font-Size="X-Small" Width="800px" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" OnSelectedIndexChanged="DataGrid5_Select"
DataKeyField="SKU" AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3" ShowFooter="True"
OnItemDataBound="MyDataGrid_ItemDataBound" AllowSorting="True" OnSortCommand="DataGrid5_Sort">
Any idea as to why this won't build?

BC

Juan T. Llibre wrote:
>Try changing :

Namespace test
Public Class Item
Inherits System.Web.UI.Page

to :

Namespace test
Partial Class Item
Inherits System.Web.UI.Page
' rest of the code...
End Class ' this "End Class" is important, too!

The rest looks good to go.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Blasting Cap" <go****@christian.netwrote in message
news:uR**************@TK2MSFTNGP02.phx.gbl...
>>Juan:

That is correct - I am trying to convert a 1.1 app to 2.0, and seem to have one page that
continually fails.

The error messages I get are (all of this is in the ASPX I've posted previously):

'Datagrid5_Sort' is not a member of 'ASP.sales_item_aspx'
'MyDatagrid_ItemDataBound' is not a member of 'ASP.sales_item_aspx'
'Datagrid5_select' is not a member of 'ASP.sales_item_aspx'.
'DGCustomer_sort' is not a member of 'ASP.sales_item_aspx'.

and so on.

I've created a new page (adding it to my sales folder in the application), and pasted the stuff
between the BODY tags on the Aspx page in it, and pasted everything from the Page Load on from
the aspx.vb page into the new one & still get the errors.

Other pages that do sorts on the datagrid will build just fine.

In the ones causing the problem, the first line of the aspx page is:

<%@ Page Language="vb" AutoEventWireup="false" Inherits="test.Item" enableViewState="True"
CodeFile="Item.aspx.vb" %>

The aspx.vb/codefile has in it (this is everything above the Page Load section):
Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
Imports System.Data
Imports System.Text

'Partial Class Sales_Item
' Inherits System.Web.UI.Page

'End Class

Namespace test

Public Class Item
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()

End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
Dim strName As String
Dim nbrpos As Double
Dim orderqty As Double
Dim shipqty As Double
Dim sBol(5) As String
Dim sCarrier(5) As String
Dim orderval As Double
Dim shipval As Double
Dim sOrg As String = "0"
Dim sRegion As String = "0"
Dim sRep As String = "0"
'dim sDC as string = "0"
Dim sRestrict As String
Dim sAmmo As String
Dim sSold As String
Dim sShip As String
Dim sDCs As String
One of the other pages (with a sortable datagrid) that will build fine - the first line of the
aspx page has:

<%@ Page Language="VB" AutoEventWireup="false" Inherits="test.ProgramSummary"
enableViewState="True" CodeFile="ProgramSummary.aspx.vb" %>

Everything above the Page Load in it is:

Imports System.Data.OleDb
Imports System.Data
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
'Imports System.Net.Mail
Imports System.Web.Mail
Imports System.Text
Namespace test
Partial Class ProgramSummary

Inherits System.Web.UI.Page


#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()

End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
I even thought the first statement on the datagrid might be a problem. This one works:

<asp:datagrid id="Datagrid2" runat="server" ToolTip="Program Summary" Width="100%"
AllowSorting="True" OnItemDataBound="mydatagrid_itemdatabound" ShowFooter="True"
AutoGenerateColumns="False" OnSortCommand="SortCommand_OnClick" Font-Size="Small">

this one does not:

<asp:datagrid id="DataGrid5" runat="server" Font-Size="X-Small" Width="800px" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" OnSelectedIndexChanged="DataGrid5_Select"
DataKeyField="SKU" AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3"
ShowFooter="True" OnItemDataBound="MyDataGrid_ItemDataBound" AllowSorting="True"
OnSortCommand="DataGrid5_Sort">
BC
Juan T. Llibre wrote:
Hi.

To recap :

You've got a basic 1.1 page with code-behind
which fails when converted to 2.0, right ?

Have you changed the class definition to partial classes ?

You should have something like this :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

...and, in the codebehind file :

namespace YourNameSpace
{
public partial class _Default : System.Web.UI.Page
{
//etc...

In 1.1, you'd have something like :

<%@ Page Language="C#" AutoEventWireup="false" Codebehind="Default.aspx.cs"
Inherits="ApplicationName.Default"%>

...and, in the codebehind file :

public class Default : System.Web.UI.Page

Notice the difference in "CodeBehind vs. CodeFile" syntax,
in the partial class definition, and in the default AutoEventWireup attribute.

Which model do you currently have ?

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Blasting Cap" <go****@christian.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl. ..
Any idea as to what is causing the problem?
>
I've created a new page, pasted the stuff between the <bodyand </bodytags into it, and it
gives me the same error with the new page. Pasted in all the code behind too, and it gives no
errors, but still won't build the page.
>
This page is working on a production site using framework 1.1 (I am converting to 2.0).
>
BC
>
>
>
>
>
>
>
John Saunders [MVP] wrote:
>"Blasting Cap" <go****@christian.netwrote in message
>news:ei**************@TK2MSFTNGP05.phx.gbl. ..
>>It is a web site. The page that's offending is a single web page out of 35-40 other pages
>>that compile just fine.
>I'm guessing that this is why you're not seeing what the other poster saw. Perhaps he was
>using a Web Application Project.

May 11 '07 #24

P: n/a
I'll take a look at the links.

However, why would 99 other datagrids convert into 2.0 just fine, and
the second one on this page won't do it?

BC


Juan T. Llibre wrote:
There is no real valid reason to use the DataGrid in ASP.NET 2.0.
You should use the GridView control instead.

Notice that in the ASP.NET 2.0 Data Controls tutorial, the DataGrid isn't even listed:
http://quickstarts.asp.net/QuickStar...a/default.aspx

Read this MSDN article and learn to use the new ASP.NET 2.0 Gridview control :

http://msdn2.microsoft.com/en-us/lib...ew(VS.80).aspx

The GridView control automates many tasks which had to be hand-coded in the DataGrid.

There's additional examples which show you how to use the GridView here :
http://quickstarts.asp.net/QuickStar.../gridview.aspx

Try it. You'll be glad you did.

Just create the GridView...and recycle your SQL statement, setting any other options you like/want.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Blasting Cap" <go****@christian.netwrote in message news:eR**************@TK2MSFTNGP02.phx.gbl...
>Juan:

I changed the page, and made your suggested changes. However, when I go to build Page, it still
returns those same 9 errors.
Error 1 'DataGrid5_Sort' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85 Error 2 'MyDataGrid_ItemDataBound' is not a member of
'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85 Error 3 'DataGrid5_Select' is not
a member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85 Error 4
'DGCustomer_Sort' is not a member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx
136 Error 5 'DGCustomer_Select' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 136 Error 6 'DGPOClass_Select' is not a member of
'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 161 Error 7 'DGPOList_Sort' is not a
member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 212 Error 8
'DGPOList_Select' is not a member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx
212 Error 9 'cmbPO_SelectedIndexChanged' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 292

(FYI - I have created a new page & pasted the Item code in this one and am simply trying to build
the page).

Line 85 above is:

<asp:datagrid id="DataGrid5" runat="server" Font-Size="X-Small" Width="800px" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" OnSelectedIndexChanged="DataGrid5_Select"
DataKeyField="SKU" AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3" ShowFooter="True"
OnItemDataBound="MyDataGrid_ItemDataBound" AllowSorting="True" OnSortCommand="DataGrid5_Sort">
Any idea as to why this won't build?

BC

Juan T. Llibre wrote:
>>Try changing :

Namespace test
Public Class Item
Inherits System.Web.UI.Page

to :

Namespace test
Partial Class Item
Inherits System.Web.UI.Page
' rest of the code...
End Class ' this "End Class" is important, too!

The rest looks good to go.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Blasting Cap" <go****@christian.netwrote in message
news:uR**************@TK2MSFTNGP02.phx.gbl...
Juan:

That is correct - I am trying to convert a 1.1 app to 2.0, and seem to have one page that
continually fails.

The error messages I get are (all of this is in the ASPX I've posted previously):

'Datagrid5_Sort' is not a member of 'ASP.sales_item_aspx'
'MyDatagrid_ItemDataBound' is not a member of 'ASP.sales_item_aspx'
'Datagrid5_select' is not a member of 'ASP.sales_item_aspx'.
'DGCustomer_sort' is not a member of 'ASP.sales_item_aspx'.

and so on.

I've created a new page (adding it to my sales folder in the application), and pasted the stuff
between the BODY tags on the Aspx page in it, and pasted everything from the Page Load on from
the aspx.vb page into the new one & still get the errors.

Other pages that do sorts on the datagrid will build just fine.

In the ones causing the problem, the first line of the aspx page is:

<%@ Page Language="vb" AutoEventWireup="false" Inherits="test.Item" enableViewState="True"
CodeFile="Item.aspx.vb" %>

The aspx.vb/codefile has in it (this is everything above the Page Load section):
Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
Imports System.Data
Imports System.Text

'Partial Class Sales_Item
' Inherits System.Web.UI.Page

'End Class

Namespace test

Public Class Item
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()

End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
Dim strName As String
Dim nbrpos As Double
Dim orderqty As Double
Dim shipqty As Double
Dim sBol(5) As String
Dim sCarrier(5) As String
Dim orderval As Double
Dim shipval As Double
Dim sOrg As String = "0"
Dim sRegion As String = "0"
Dim sRep As String = "0"
'dim sDC as string = "0"
Dim sRestrict As String
Dim sAmmo As String
Dim sSold As String
Dim sShip As String
Dim sDCs As String
One of the other pages (with a sortable datagrid) that will build fine - the first line of the
aspx page has:

<%@ Page Language="VB" AutoEventWireup="false" Inherits="test.ProgramSummary"
enableViewState="True" CodeFile="ProgramSummary.aspx.vb" %>

Everything above the Page Load in it is:

Imports System.Data.OleDb
Imports System.Data
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
'Imports System.Net.Mail
Imports System.Web.Mail
Imports System.Text
Namespace test
Partial Class ProgramSummary

Inherits System.Web.UI.Page


#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()

End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region
I even thought the first statement on the datagrid might be a problem. This one works:

<asp:datagrid id="Datagrid2" runat="server" ToolTip="Program Summary" Width="100%"
AllowSorting="True" OnItemDataBound="mydatagrid_itemdatabound" ShowFooter="True"
AutoGenerateColumns="False" OnSortCommand="SortCommand_OnClick" Font-Size="Small">

this one does not:

<asp:datagrid id="DataGrid5" runat="server" Font-Size="X-Small" Width="800px" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" OnSelectedIndexChanged="DataGrid5_Select"
DataKeyField="SKU" AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3"
ShowFooter="True" OnItemDataBound="MyDataGrid_ItemDataBound" AllowSorting="True"
OnSortCommand="DataGrid5_Sort">
BC
Juan T. Llibre wrote:
Hi.
>
To recap :
>
You've got a basic 1.1 page with code-behind
which fails when converted to 2.0, right ?
>
Have you changed the class definition to partial classes ?
>
You should have something like this :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
>
...and, in the codebehind file :
>
namespace YourNameSpace
{
public partial class _Default : System.Web.UI.Page
{
>
>
//etc...
>
In 1.1, you'd have something like :
>
<%@ Page Language="C#" AutoEventWireup="false" Codebehind="Default.aspx.cs"
Inherits="ApplicationName.Default"%>
>
...and, in the codebehind file :
>
public class Default : System.Web.UI.Page
>
Notice the difference in "CodeBehind vs. CodeFile" syntax,
in the partial class definition, and in the default AutoEventWireup attribute.
>
Which model do you currently have ?
>
>
>
>
>
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Blasting Cap" <go****@christian.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl.. .
>Any idea as to what is causing the problem?
>>
>I've created a new page, pasted the stuff between the <bodyand </bodytags into it, and it
>gives me the same error with the new page. Pasted in all the code behind too, and it gives no
>errors, but still won't build the page.
>>
>This page is working on a production site using framework 1.1 (I am converting to 2.0).
>>
>BC
>>
>>
>>
>>
>>
>>
>>
>John Saunders [MVP] wrote:
>>"Blasting Cap" <go****@christian.netwrote in message
>>news:ei**************@TK2MSFTNGP05.phx.gbl.. .
>>>It is a web site. The page that's offending is a single web page out of 35-40 other pages
>>>that compile just fine.
>>I'm guessing that this is why you're not seeing what the other poster saw. Perhaps he was
>>using a Web Application Project.

May 11 '07 #25

P: n/a
re:
!I'll take a look at the links.

I'm sure you'll profit from them.

re:
!However, why would 99 other datagrids convert into 2.0 just fine, and
!the second one on this page won't do it?

No idea, but the Datagrid isn't the best data display/edit tool in ASP.NET 2.0.
It's the GridView. You should use the best tool for the best version.

You'll find it a lot easier to program the GridView, and it's more efficient, too.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Blasting Cap" <go****@christian.netwrote in message
news:uv****************@TK2MSFTNGP06.phx.gbl...
I'll take a look at the links.

However, why would 99 other datagrids convert into 2.0 just fine, and the second one on this page
won't do it?

BC


Juan T. Llibre wrote:
>There is no real valid reason to use the DataGrid in ASP.NET 2.0.
You should use the GridView control instead.

Notice that in the ASP.NET 2.0 Data Controls tutorial, the DataGrid isn't even listed:
http://quickstarts.asp.net/QuickStar...a/default.aspx

Read this MSDN article and learn to use the new ASP.NET 2.0 Gridview control :

http://msdn2.microsoft.com/en-us/lib...ew(VS.80).aspx

The GridView control automates many tasks which had to be hand-coded in the DataGrid.

There's additional examples which show you how to use the GridView here :
http://quickstarts.asp.net/QuickStar.../gridview.aspx

Try it. You'll be glad you did.

Just create the GridView...and recycle your SQL statement, setting any other options you
like/want.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Blasting Cap" <go****@christian.netwrote in message
news:eR**************@TK2MSFTNGP02.phx.gbl...
>>Juan:

I changed the page, and made your suggested changes. However, when I go to build Page, it still
returns those same 9 errors.
Error 1 'DataGrid5_Sort' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85 Error 2 'MyDataGrid_ItemDataBound' is not a member of
'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85 Error 3 'DataGrid5_Select' is
not a member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 85 Error 4
'DGCustomer_Sort' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 136 Error 5 'DGCustomer_Select' is not a member of
'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 136 Error 6 'DGPOClass_Select' is
not a member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 161 Error 7
'DGPOList_Sort' is not a member of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx
212 Error 8 'DGPOList_Select' is not a member of 'ASP.sales_aaa_aspx'.
C:\Inetpub\wwwroot\test\Sales\aaa.aspx 212 Error 9 'cmbPO_SelectedIndexChanged' is not a member
of 'ASP.sales_aaa_aspx'. C:\Inetpub\wwwroot\test\Sales\aaa.aspx 292

(FYI - I have created a new page & pasted the Item code in this one and am simply trying to
build the page).

Line 85 above is:

<asp:datagrid id="DataGrid5" runat="server" Font-Size="X-Small" Width="800px" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" OnSelectedIndexChanged="DataGrid5_Select"
DataKeyField="SKU" AutoGenerateColumns="False" BorderWidth="1px" CellPadding="3"
ShowFooter="True" OnItemDataBound="MyDataGrid_ItemDataBound" AllowSorting="True"
OnSortCommand="DataGrid5_Sort">
Any idea as to why this won't build?

BC

Juan T. Llibre wrote:
Try changing :

Namespace test
Public Class Item
Inherits System.Web.UI.Page

to :

Namespace test
Partial Class Item
Inherits System.Web.UI.Page
' rest of the code...
End Class ' this "End Class" is important, too!

The rest looks good to go.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Blasting Cap" <go****@christian.netwrote in message
news:uR**************@TK2MSFTNGP02.phx.gbl...
Juan:
>
That is correct - I am trying to convert a 1.1 app to 2.0, and seem to have one page that
continually fails.
>
The error messages I get are (all of this is in the ASPX I've posted previously):
>
'Datagrid5_Sort' is not a member of 'ASP.sales_item_aspx'
'MyDatagrid_ItemDataBound' is not a member of 'ASP.sales_item_aspx'
'Datagrid5_select' is not a member of 'ASP.sales_item_aspx'.
'DGCustomer_sort' is not a member of 'ASP.sales_item_aspx'.
>
and so on.
>
I've created a new page (adding it to my sales folder in the application), and pasted the
stuff between the BODY tags on the Aspx page in it, and pasted everything from the Page Load
on from the aspx.vb page into the new one & still get the errors.
>
Other pages that do sorts on the datagrid will build just fine.
>
In the ones causing the problem, the first line of the aspx page is:
>
<%@ Page Language="vb" AutoEventWireup="false" Inherits="test.Item" enableViewState="True"
CodeFile="Item.aspx.vb" %>
>
The aspx.vb/codefile has in it (this is everything above the Page Load section):
>
>
Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
Imports System.Data
Imports System.Text
>
'Partial Class Sales_Item
' Inherits System.Web.UI.Page
>
'End Class
>
>
>
Namespace test
>
Public Class Item
Inherits System.Web.UI.Page
>
>
>
#Region " Web Form Designer Generated Code "
>
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()
>
End Sub
>
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
>
#End Region
>
>
Dim strName As String
Dim nbrpos As Double
Dim orderqty As Double
Dim shipqty As Double
Dim sBol(5) As String
Dim sCarrier(5) As String
Dim orderval As Double
Dim shipval As Double
Dim sOrg As String = "0"
Dim sRegion As String = "0"
Dim sRep As String = "0"
'dim sDC as string = "0"
Dim sRestrict As String
Dim sAmmo As String
Dim sSold As String
Dim sShip As String
Dim sDCs As String
>
>
One of the other pages (with a sortable datagrid) that will build fine - the first line of the
aspx page has:
>
<%@ Page Language="VB" AutoEventWireup="false" Inherits="test.ProgramSummary"
enableViewState="True" CodeFile="ProgramSummary.aspx.vb" %>
>
Everything above the Page Load in it is:
>
Imports System.Data.OleDb
Imports System.Data
Imports System.IO
Imports System.Data.SqlClient
Imports System
Imports System.Net
Imports System.Web
Imports System.Web.UI
'Imports System.Net.Mail
Imports System.Web.Mail
Imports System.Text
>
>
Namespace test
>
>
Partial Class ProgramSummary
>
>
>
Inherits System.Web.UI.Page
>
>
>
>
#Region " Web Form Designer Generated Code "
>
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()
>
End Sub
>
>
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
>
#End Region
>
>
I even thought the first statement on the datagrid might be a problem. This one works:
>
<asp:datagrid id="Datagrid2" runat="server" ToolTip="Program Summary" Width="100%"
AllowSorting="True" OnItemDataBound="mydatagrid_itemdatabound" ShowFooter="True"
AutoGenerateColumns="False" OnSortCommand="SortCommand_OnClick" Font-Size="Small">
>
this one does not:
>
<asp:datagrid id="DataGrid5" runat="server" Font-Size="X-Small" Width="800px"
BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
OnSelectedIndexChanged="DataGrid5_Select" DataKeyField="SKU" AutoGenerateColumns="False"
BorderWidth="1px" CellPadding="3" ShowFooter="True" OnItemDataBound="MyDataGrid_ItemDataBound"
AllowSorting="True" OnSortCommand="DataGrid5_Sort">
>
>
BC
>
>
Juan T. Llibre wrote:
>Hi.
>>
>To recap :
>>
>You've got a basic 1.1 page with code-behind
>which fails when converted to 2.0, right ?
>>
>Have you changed the class definition to partial classes ?
>>
>You should have something like this :
><%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
>%>
>>
>...and, in the codebehind file :
>>
>namespace YourNameSpace
>{
>public partial class _Default : System.Web.UI.Page
>{
>>
>>
>//etc...
>>
>In 1.1, you'd have something like :
>>
><%@ Page Language="C#" AutoEventWireup="false" Codebehind="Default.aspx.cs"
>Inherits="ApplicationName.Default"%>
>>
>...and, in the codebehind file :
>>
>public class Default : System.Web.UI.Page
>>
>Notice the difference in "CodeBehind vs. CodeFile" syntax,
>in the partial class definition, and in the default AutoEventWireup attribute.
>>
>Which model do you currently have ?
>>
>>
>>
>>
>>
>Juan T. Llibre, asp.net MVP
>asp.net faq : http://asp.net.do/faq/
>foros de asp.net, en español : http://asp.net.do/foros/
>===================================
>"Blasting Cap" <go****@christian.netwrote in message
>news:%2****************@TK2MSFTNGP06.phx.gbl. ..
>>Any idea as to what is causing the problem?
>>>
>>I've created a new page, pasted the stuff between the <bodyand </bodytags into it, and
>>it gives me the same error with the new page. Pasted in all the code behind too, and it
>>gives no errors, but still won't build the page.
>>>
>>This page is working on a production site using framework 1.1 (I am converting to 2.0).
>>>
>>BC
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>John Saunders [MVP] wrote:
>>>"Blasting Cap" <go****@christian.netwrote in message
>>>news:ei**************@TK2MSFTNGP05.phx.gbl. ..
>>>>It is a web site. The page that's offending is a single web page out of 35-40 other pages
>>>>that compile just fine.
>>>I'm guessing that this is why you're not seeing what the other poster saw. Perhaps he was
>>>using a Web Application Project.
May 11 '07 #26

This discussion thread is closed

Replies have been disabled for this discussion.