1 Replies - 4411 Views - Last Post: 06 January 2011 - 11:26 AM

#1 zauii   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 02-January 11

New to Asp, dropdownlist (integration between two tables)

Posted 04 January 2011 - 03:21 PM


First of all i am very new to ASP MVC so bear with me, and I'll try not to write a wall of nonsense.
What i have is two tables in a database, i've linked them via Entity Framework.
First of all we've the one called "forfattare" which is "writer or author" in english
and the second one is "bok" which means book in english.

Posted Image

Essentially its a one to many relation , where one of the tables has a foreign key.
The idea of my primitive work is that you should be able to add,remove,update and delete
both books and authors.

Now i already have all the functionality working for Author since it doesn't require any interaction
with the table book, however when it comes to handling the books table, for instance when adding a new
book i would need to display the authors from the other table in a dropdownlist somehow.

Can this be achieved via some predefined function or how do i get the tables to interact?
Any tips/ideas to push me in the right direction would be greatly appreciated as i am fumbling in the dark
while looking around.

This post has been edited by zauii: 04 January 2011 - 03:22 PM

Is This A Good Question/Topic? 0
  • +

Replies To: New to Asp, dropdownlist (integration between two tables)

#2 Sergio Tapia   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1258
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: New to Asp, dropdownlist (integration between two tables)

Posted 06 January 2011 - 11:26 AM

Here's a tutorial I wrote:


These might interest you as well, not related but useful:

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1