Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 08, 2012 09:26 AM by Doctor Sid
0 Points
1 Post
May 08, 2012 06:52 AM|LINK
I have to create the fields by selecting the service what is the best ways ?
for example : if i select one category the fields should be different and selecing other categoy the fields must by diffenet
All-Star
137682 Points
22147 Posts
Moderator
MVP
May 08, 2012 07:29 AM|LINK
Charandeep if i select one category the fields should be different and selecing other categoy the fields must by diffenet
What fields? Could you give some (simple) example?
Participant
977 Points
819 Posts
May 08, 2012 07:58 AM|LINK
Hello,
You probably speak about cascading dropdowns.
Here are some examples
http://stackoverflow.com/questions/5497524/easiest-way-to-create-a-cascade-dropdown-in-asp-net-mvc-3-with-c-sharp
http://stephenwalther.com/blog/archive/2008/09/07/asp-net-mvc-tip-41-creating-cascading-dropdown-lists-with-ajax.aspx
Member
156 Points
46 Posts
May 08, 2012 09:26 AM|LINK
easiest solution would be to automatically submit the form when the dropdown selection changes:
@Html.DropDownListFor(m => m.SelectedValue, Model.ListEntries, new { onchange = "this.form.submit();" })
in the corresponding POST action you populate the second dropdown and display the same view again
Charandeep
0 Points
1 Post
create the fields by selecting the different service
May 08, 2012 06:52 AM|LINK
I have to create the fields by selecting the service what is the best ways ?
for example : if i select one category the fields should be different and selecing other categoy the fields must by diffenet
ignatandrei
All-Star
137682 Points
22147 Posts
Moderator
MVP
Re: create the fields by selecting the different service
May 08, 2012 07:29 AM|LINK
What fields? Could you give some (simple) example?
zuperboy90
Participant
977 Points
819 Posts
Re: create the fields by selecting the different service
May 08, 2012 07:58 AM|LINK
Hello,
You probably speak about cascading dropdowns.
Here are some examples
http://stackoverflow.com/questions/5497524/easiest-way-to-create-a-cascade-dropdown-in-asp-net-mvc-3-with-c-sharp
http://stephenwalther.com/blog/archive/2008/09/07/asp-net-mvc-tip-41-creating-cascading-dropdown-lists-with-ajax.aspx
Doctor Sid
Member
156 Points
46 Posts
Re: create the fields by selecting the different service
May 08, 2012 09:26 AM|LINK
easiest solution would be to automatically submit the form when the dropdown selection changes:
@Html.DropDownListFor(m => m.SelectedValue, Model.ListEntries, new { onchange = "this.form.submit();" })
in the corresponding POST action you populate the second dropdown and display the same view again