G
Guest
Hello.
I am trying to do the simplest of things. These are exactly the steps I follow:
1. create an sqlConnection to an SQL Server database.
2. create a DataSource and produce a DataSet to a single table.
3. drop a DataGrid control to a Web Form and bind it to the DataSet.
4. customize the DataGrid:
4.1 unckeck "create columns automatically..."
4.2 add 3-4 bound columns, 2 Select columns, 1 Edit Button, 1 Delete Button and 1 template column.
4.3 the template column is bound to a Boolean value and I thought it is more appropriate to have a CheckBox displayed instead of a Label control.
5. in the Page_Load event I type the simplest of code:
DataSource.Fill(DataSet,"TableName");
DataGrid.BadaBind();
6. Amazingly the DataGrid won't run by no means. Instead I get the not-so-explanatory error message:
"Server Error in '/Protocol2004' Application. Control 'dgProtocols__ctl2__ctl0' of type 'DataGridLinkButton' must be placed inside a form tag with runat=server."
You understand of course that something is terribly wrong internally. Please note that I just used the designers and property editors!!!!
Any explanations / solutions ?
Is this the so called "productivity" of the .NET platform?
Dimitris
I am trying to do the simplest of things. These are exactly the steps I follow:
1. create an sqlConnection to an SQL Server database.
2. create a DataSource and produce a DataSet to a single table.
3. drop a DataGrid control to a Web Form and bind it to the DataSet.
4. customize the DataGrid:
4.1 unckeck "create columns automatically..."
4.2 add 3-4 bound columns, 2 Select columns, 1 Edit Button, 1 Delete Button and 1 template column.
4.3 the template column is bound to a Boolean value and I thought it is more appropriate to have a CheckBox displayed instead of a Label control.
5. in the Page_Load event I type the simplest of code:
DataSource.Fill(DataSet,"TableName");
DataGrid.BadaBind();
6. Amazingly the DataGrid won't run by no means. Instead I get the not-so-explanatory error message:
"Server Error in '/Protocol2004' Application. Control 'dgProtocols__ctl2__ctl0' of type 'DataGridLinkButton' must be placed inside a form tag with runat=server."
You understand of course that something is terribly wrong internally. Please note that I just used the designers and property editors!!!!
Any explanations / solutions ?
Is this the so called "productivity" of the .NET platform?
Dimitris