Tuesday, 29 December 2015

New Year Count Down


Click Here
New Year's Eve Countdown
Day
: :

Sunday, 27 December 2015

Easiest way to bind the data to Dropdownlist in ASP.NET MVC


  • For binding the data from database one now do not have to write sql query neither have to go for writing extra code in Model. It is much simple just you need to know the LINQ... that's it.
  • We'll see it step by step.
  • First we'll create a form and add dropdownlist to it as shown below.









  • For binding the data no stuff should be written in Model Class file.... .
  • Simply goto controller -> action method and write code. 
  • In my case I want to bind the Server IPAddress to DropDownList and below is the code.



















  • As shown above data is explicitly converted to List . The reason behind this is SelectList accepts result type as Collection.



































 

How To Pass An Array As A Parameter While Calling an ASP.NET Web API C#

Please visit my C# Corner Blog for this, where I have provided better efforts to make this concept more understandable - www.c-sharpcorner....