Hello. I'm trying to learn asp.net 2.0. i just started last week. i was wondering if someone can help me with data binding. I've have a hard time transitioning from vb6 to asp.net 2.0. I hope you guys can help me on this simple problem of mine.
I use sql server 2000 as my database. Below are my tables and questions.
My Tables:
I know this is very trivial to some of you guys. I was experimenting with the databinding technique of vs 2005 but got lost when i tried to inner join the tblCourse with tblStudent. I wanted to edit the template for field [CourseID] into a drop down list in edit/add mode so that i can choose freely a course title item and update the tblStudent table. Is there a way to this with databinding? Can I have my ddl show CourseTitle in the list items and post the CourseID as value into tblstudent? or do i have to do it manually in code? any help will be very appreciated. thanks.Code:tblStudent StudentID bigint StudentName varchar CourseID bigint tblCourse CourseID bigint CourseTitle varchar Typical asp.net 2.0 data binding in Gridview StudentID StudentName CourseID 100001 George Washington 100 100002 Jose Rizal 101 100003 John Doe 102 100004 Albert Einstein 103 What I wanted to show in Gridview (select, insert, update, delete enabled) StudentID StudentName CourseTitle 100001 George Washington Engineering 100002 Jose Rizal Management 100003 John Doe Criminology 100004 Albert Einstein Nuclear Physics




Reply With Quote