Results 1 to 4 of 4

Thread: RESOLVED [VS 2005]- asp.net 2.0 data binding help

Threaded View

  1. #1

    Thread Starter
    Addicted Member coolwater's Avatar
    Join Date
    Dec 2004
    Location
    philippines
    Posts
    215

    Resolved RESOLVED [VS 2005]- asp.net 2.0 data binding help

    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:
    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
    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.
    Attached Images Attached Images     
    Last edited by coolwater; Mar 26th, 2007 at 01:30 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width