Amazon Ad

Monday, 21 April 2014

Creating Dependent DropDownList in MVC without jQuery.



Hi Guys,

I was given a task to generate dependent values in DropDownList without using jQuery. However this approach is not recommended but incase you still want to generate the dependent dropdownlist values based upon the parent dropdownlist value, Here are the steps to do so.

In my example i am using an example of Category, SubCategory and Product. Based on the category dropdown, subcategory dropdown list is generated and the product is then saved based on the category and subcategory values. In this example i have taken both category and subcategory reference in product table, However it can be done by taking only reference of subcategory table.

Step 1: Generate models
public class Category
    {
        [Key]
        public virtual int CategoryId { get; set; }
        public virtual string CategoryName { get; set; }
        public List<SubCategory> SubCategories { get; set; }
        public List<Product> Products { get; set; }
    }

Wednesday, 16 April 2014

How to get client's MAC Address from browser


Hi Guys,

I was having problem of finding out MAC address from browser. I finally achieved the same by using help from a blog and jQuery. The current code is tested on local LAN and it gives the MAC address based on the local LAN ip address.

Here is how i achieved it


How to implement Captcha v3 in ASP.NET

 I was facing an issue of dom parsing in my website. I finally resolved it by using Google Captcha V3. Step 1: Get your keys from https:...