Click here to Skip to main content
15,844,152 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have two class as below:
C#
public class Agency_Master
    {
        [Key]
        public int Agency_Id { get; set; }

        [Display(Name = "Agency Name")]
        [Required(AllowEmptyStrings = false, ErrorMessage = "Please Provide Agency Name")]
        public string Agency_Name { get; set; }

        [Display(Name = "Address")]
        [Required(AllowEmptyStrings = false, ErrorMessage = "Please Provide Agency Category Name")]

        public string Address_01 { get; set; }

        public virtual Agency_Category_Master Agency_Category_Master { get; set; }
        public virtual Region_Master Region_Master { get; set; }

        public virtual List<agency_embargo_details> Agency_Embargo_Details { get; set; }
        public virtual List<agency_gstn_details> Agency_GSTN_Details { get; set; }

    }
	
public class Agency_GSTN_Details
    {
        public int Agency_GSTN_Id { get; set; }
        public int Agency_Id { get; set; }
        public string GSTN { get; set; }

        public int SlNo { get; set; }
        public Nullable<system.datetime> Created_Date { get; set; }


    }

What I need is:

during edit mode, multiple Agency_Gstn_Details should be added, edited or deleted before the final submit. this list should be shown in table.

the gstn details should be added using a textbox and button.

for editing the record is selected from the table row and shown back in textbox to update the list.

Please help to achieve the above.

What I have tried:

I can show the model details in edit mode now. But confused in adding and editing records in table for gstn details before save.
Posted
Updated 3-Mar-21 8:59am
v3
Comments
Laxmidhar tatwa technologies 15-Dec-19 7:37am    
hi you need to edit in client side

1 solution

I'm not sure if I follow, but I are you looking for something like this? ASP.NET MVC 5: Building Your First Web Application - Part 3[^]

If you are new to ASP.NET MVC, perhaps my series of article would help you understand MVC a bit more. Check out Part 1 here: ASP.NET MVC 5: Building Your First Web Application - Part 1[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900