Mar 09, 2013, 11:17 PM
Using multiple FormPanelFor raises error.
I've 2 FormPanelFor definitions:
A Control with an ID of "App.Name" has already been initialized. Please ensure that all Controls have a unique id.
The following Control has the same ID as at least one other Control on the Page. All Controls must have a unique ID.
*************************
Control Details
*************************
ID: Name.
ClientID: App.Name
Type: TextField
*************************
Parent Control Details
*************************
ID: selectedGroup
ClientID: App.selectedGroup
Type: FormPanel
how can i fix this?
..
.Items
(
x.FormPanelFor(m => m.SelectedSection).ID("selectedSection"),
x.FormPanelFor(m => m.SelectedGroup).ID("selectedGroup")
)
And have model definitions: public class Model_Section
{
[Field(FieldLabel = "Section Name", AllowBlank = false)]
public string Name { get; set; }
.....
}
public class Model_Group
{
[Field(FieldLabel = "Group Name", AllowBlank = false)]
public string Name { get; set; }
.....
}
they both have "Name" property in common and as a result i got this error:A Control with an ID of "App.Name" has already been initialized. Please ensure that all Controls have a unique id.
The following Control has the same ID as at least one other Control on the Page. All Controls must have a unique ID.
*************************
Control Details
*************************
ID: Name.
ClientID: App.Name
Type: TextField
*************************
Parent Control Details
*************************
ID: selectedGroup
ClientID: App.selectedGroup
Type: FormPanel
how can i fix this?