public static class LogicBaseFactory{ public static LogicBase Create(string whichOne) { return new LogicSubclassB(); }}
public class GraphicsSubclass : GraphicsBase<LogicBase>{ public GraphicsSubclass(LogicBase logicObject) : base(logicObject) { }}
public static class GraphicsFactory{ public static GraphicsSubclass Create(string whichOne) { return new GraphicsSubclass(new LogicSubclassB()); }}
GraphicsSubclass g = GraphicsFactory.Create("b");
<asp:GridView ID="gvchaptername" AutoGenerateColumns="false" GridLines="None" OnRowDataBound="gvchaptername_RowDataBound" runat="server" > <Columns> <asp:TemplateField HeaderText=""> <ItemTemplate> <asp:DropDownList ID="DropDownList1" class="form-control" ClientIDMode="Static" runat="server"></asp:DropDownList> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <script type="text/javascript"> $("#DropDownList1").css("border-color", "red"); </script>
[HttpGet] public ActionResult CoursesRegistration() { // return a View with the form in it } [HttpPost] public ActionResult CoursesRegistration( eNtsaRegCourses model) { // process the form }