helpers - Help with asp.net mvc and Select List Dropdown -


I want to create this dropdown with these specific attributes .. How can I do this? Employees of each company using Im LinqToSql

  & lt; Select name = "companies" id = "companies" category = "selection"> & Lt; Option value = "" & gt; - Select - & lt; / Options & gt; & Lt; Option value = "1" headline = "company1" & gt; Company 1 & lt; / Options & gt; & Lt; Option value = "2" title = "company2" & gt; Company 2 & lt; / Options & gt; & Lt; Option value = "3" title = "company3" & gt; Company 3 & lt; / Options & gt; & Lt; Option value = "4" title = "company4" & gt; Company 4 & lt; / Options & gt; & Lt; / Select & gt; & Lt; Select name = "employee" id = "employee" class = "selection" & gt; & Lt; Option value = "" & gt; - Select - & lt; / Options & gt; & Lt; Option value = "1" class = "company1" & gt; John & lt; / Options & gt; & Lt; Option value = "2" class = "company1" & gt; Michelle & lt; / Options & gt; & Lt; Option value = "4" class = "company2" & gt; Brian & lt; / Options & gt; & Lt; Option value = "5" square = "company2" & gt; Mark & ​​lt; / Options & gt; & Lt; Option value = "6" square = "company3" & gt; Daniel & lt; / Options & gt; & Lt; Option value = "7" class = "company3" & gt; Rose & lt; / Options & gt; & Lt; / Select & gt;  

Do I need to make my assistant? Please help. All this comes from the database and I have company and staff with LINQTOSQL classes

As far as I Yes I know .. The default HTML Assistant does not give you the ability to set the title or square attribute on the option ...

I recommend myself (or see if someone else is there) Did this which resolves this problem).

If you build your own, then I use lambda (anonymous link representatives) to capture / define your properties for choice. In this way you can reuse it, tell me if you need help about it.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -