0

I have 2 models with a foreign Key, TblConfig is the Parent and TblStock is the Child. How can I write a Javascript event or server side script. when I click on a button on Stock View Create, TblConfig appears I select the product I want and it polulates the Stock View Textboxes i.e ID, Name and Price and leave one Textbox empty where I'll put stock. I can do it very easy on c# standalone using the "onclick event" but on web MVC I have no idea!!

this is my first Question someone please help me with the answer.

Thank you.

4
  • stackoverflow.com/questions/42549622/… Commented Sep 12, 2018 at 19:48
  • Thanks for the link but Populating a dropdown list, I can do that. My issue is selecting data and populate text boxes Commented Sep 12, 2018 at 19:54
  • listen to the click event, make an ajax call to get the data, update the input element. I suggest you start trying it. Commented Sep 12, 2018 at 20:38
  • First step what I did I created a Partial View in modal and it's working fine. so I have My table on my partial view and the text boxes on the parent page. when I click on the table it's populating the text boxes but the when I click another row it's not changing the values ? how can You assist Commented Sep 17, 2018 at 9:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.