You can assign any values to the element of enumeration List. In this example, I will show to how to assign values and datatype and get integer value from enum.
It can be achieved by two methods, getting the domain hosted name using URL request Request.Url.Host and another by Uri.
I got this error “System.Data.Entity.DynamicProxies.Product Does not contain a property with the name ‘ProductId” while binding the object to the dropdownlist using the c# .net.
I got this following error “Data binding to a store query is not support”, when I tried to bind the dropdownlist using the entity framework model object.
In this example, I will show you to bind dropdownlist with an xml file using ReadXml() method. In order to read data from cities.xml file into a dataset from the specified path using Server.MapPath.
In this example, I used dropdownlist and button, I binded dropdownlist with countries name on the page load.
When working with large projects, partial class splits the class for multiple programmers to work on it at the same time.
In this example I will show you how to pass string to view mvc in application. The appropriate way to you must cast in to an object and return as view. In view model you must define the object type and write the string in required place.
In this example I will show you how to pass IEnumerable string to view mvc in application. I used string array with array elements contains list of names. I filtered names having length >=5 and assigned to IEnumerable string varable. The appropriate way to pass data from controller to view, is to pass the filterednames to the view
In this example I will show you how to create xml document using Linq .In order to extract data from a database and create an xml document we need to include the namespace using System.Xml.Linq.