Skip to main content

SCRUMble ! - New Book about SCRUM

 SCRUMble ! Hello Blog Readers! Thank you for all your support and encouragement. I have something exciting for you all. I have recently written and published a new book called 'SCRUMble !'. It is currently available on pothi store. It will be soon available on Amazon and Flipkart as well. Please get your copy and do let me know your reviews. -Abhishek Sathe SCRUMble ! Written and Published by: Abhishek Sathe                                                                              Distributed by: pothi.com Order your copy now:  https://store.pothi.com/book/abhishek-sathe-scrumble/ Coming soon on Amazon and Flipkart About the book: Scrum is a framework for solving complex problems largely adapted by Software Development field. There are multiple ag...

'VIEWS' in ASP.NET MVC

Model, View and Controller are the three most important folders that you can see in an ASP.NET MVC project while using Visual Studio 2013.

When you type /HOME/ABOUT in the URL, HOME controller from Controller folder gets activated (particularly About method gets activated) which builds a Model to satisfy the incoming requests and View is the one which views the model. In above example, About.cshtml is the view that views the model.

Views can be returned by two types:
  1. ViewBag - For example, ViewBag.Name="Abhishek" from About action method can be rendered as                                                                                                                                       <div>Name:@ViewBag.Name</div>  in view About.cshtml.
  2. Strongly Typed Models - For example, we can create a model in Models->Add->Class named 'AboutModel'. In AboutModel constructor, we can write                                                                public string Name {get; set;}.                                                                                                         In About action method we can write,                                                                                             var model = new AboutModel();                                                                                                      model.Name = "Abhi";                                                                                                                     return View(model);                                                                                                                         This can be rendered in View as                                                                                                      <h2>@Model.Name</h2>

In Views->Shared folder, you can find a file named _Layout.cshtml which has common layout of all pages.
In Views->Shared folder, you can find a file named _ViewStart.cshtml where we specify that _Layout.cshtml is our Layout file.
In _Layout.cshtml file, we need to compulsorily call RenderBody() function. RenderSection() is optional call to render layout of a particular section.
In _Layout.cshtml, we can add a new Link by using Html.ActionLink. ActionLink is an example of Html Helper.

Html is a property of the ViewPage base class. It includes:
-Create Inputs
-Create Links
-Create Forms

Partial Views can be used to review already existing model.                                      

Comments

Popular posts from this blog

Bipartite and semihamiltonian graphs

Bipartite Graph: A graph is bipartite if its vertex set can be partitioned into two subsets X and Y so that every edge has one end in X and one end in Y; such a partition (X,Y) is called bipartition of the graph, and X and Y its parts. ex.- Notation: We denote a bipartite graph G with bipartition (X,Y) by G[X,Y]. Complete Bipartite Graph: If G[X,Y] is simple and every vertex in X is joined to every vertex in Y, then G is called a Complete Bipartite graph. ex.- Semi-Hamiltonian Graph: A semi-Hamiltonian graph is a graph that contains a Hamiltonian path, but not a Hamilton cycle. Hamiltonian Path: A Hamiltonian path in an undirected or directed graph is a path which visits each vertex exactly once. ex.- C-A-D-B-E is a Hamiltonian path Hamiltonian Cycle: A Hamiltonian cycle or a Hamiltonian Circuit is a Hamiltonian path which is a cycle. This post will be useful in understanding a question: "The nabhi kamal grapg is:" (A)Bipartite graph (B)Semi-...

Accessibility : An Important consideration in software development

What is Accessibility? Accessibility is a very important piece of consideration in today's market. It means the quality of being able to be reached or entered. Accessibility focuses on how a physically or mentally disabled person accesses or benefits from a site, system or application.  Conformance with accessibility guidelines while developing a web page or an app is important. What does accessibility mean for software development? Accessibility isn't about taking away functionality or making things difficult for the software development team. It is about making sure all possible users have a way to use the system.  How do information architects and web designers/developers design web pages to be compatible with assistive devices is an important aspect when thinking about accessibility. What does accessibility mean for software testing? Accessibility Testing checks if a product is accessible to the people having disabilities. We need to understand ...

Android 102

This post is in continuation with an earlier post : Android 101 1. Common attributes used in views and viewgroups: -layout_width -layout_height -layout_marginTop -layout_marginBottom -layout_marginLeft -layout_marginRight -layout_gravity: specifies how child views are positioned -layout_weight: specifies how much of the extra space in the layout should be allocated to the view -layout_x -layout_y 2. LinearLayout: arranges views in a single column or a single row. Child views can be arranged either vertically or horizontally. 3.AbsoluteLayout: enables you to specify the exact location of its children using layout_x and layout_y. AbsoluteLayout has been deprecated since android 1.5 4.TableLayout: groups views into rows and columns. You use <TableRow> element to designate a row in the table. Each row can contain one or more views. Each view you place within a row forms a cell. The width of each column is determined by the largest width of each cell in that column. 5....