J
Jim Bancroft
I have a .Net component I'm experimenting with that has a method like so:
public void CTest(System.Web.UI.Control myPage)
{
DataGrid myGrid= (DataGrid)
myPage.FindControl("DataGrid1");
foreach (DataGridItem item in myGrid.Items)
//etc...
}
When I call this component from an aspx page I get an error that tells me
"The type ASP.TestPage_aspx in Assembly.." <snip> "is not marked as
serializable"
I'm not quite sure what the problem is. Is it that you can't pass .aspx
pages into methods because of serialization issues, or am I making a mistake
passing it as a UI.Control, something higher up the inheritance foodchain?
If you have any leads or advice I'd be grateful. Thanks very much.
-Jim
public void CTest(System.Web.UI.Control myPage)
{
DataGrid myGrid= (DataGrid)
myPage.FindControl("DataGrid1");
foreach (DataGridItem item in myGrid.Items)
//etc...
}
When I call this component from an aspx page I get an error that tells me
"The type ASP.TestPage_aspx in Assembly.." <snip> "is not marked as
serializable"
I'm not quite sure what the problem is. Is it that you can't pass .aspx
pages into methods because of serialization issues, or am I making a mistake
passing it as a UI.Control, something higher up the inheritance foodchain?
If you have any leads or advice I'd be grateful. Thanks very much.
-Jim