Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c# - Retrieve data from dataset -


sqldataadapter da = new sqldataadapter("select studentid,studentname studentmaster studentid = '" + start + "'", conn);               dataset ds = new dataset(); da.fill(ds,"studentmaster"); sqldataadapter db = new sqldataadapter("select registration_no candidate_registration studentid='" + start + "'", conn); db.fill(ds, "candidate_registration"); 

here 'start' textbox value of textbox in previous form i.e form2. want fetch studentname , studentid studentmaster studentid = start. table named 'studentmaster'. fill dataset studentmaster. want fetch registration_no candidate_registration studentid=start. table named 'candidate_registration'. fill dataset candidate_registration. according 'registration_no' fetched, want fetch 'courseid' 'registered_courses'. but, problem is, how access fetched 'registration_no' i.e. how put in following query: if can take fetched registration_no variable named 'reg_no' then, "select courseid registered_courses registration_no="+ reg_no;

for more understanding mention tables , relationships....

studentmaster ------------- studentid primary key, studentname  candidate_registration ---------------------- registration_no foreign key, examid foreign key, studentid foreign key, seat_no, primary key(registration_no,examid)  registered_courses ------------------ registration_no primary key, examid foreign key, courseid foreign key,  course_master ------------- courseid primary key, course_name, description 

i.e. want course_name particular studentid.

can please me out. in advance!

try query :

select studentmaster.studentid, course_master.course_name studentmaster  inner join candidate_registration  on candidate_registration.studentid = studentmaster.studentid  inner join registered_courses  on registered_courses.registration_no = candidate_registration.registration_no , registered_courses.examid = candidate_registration.examid  inner join course_master  on course_master.courseid = registered_courses.courseid studentmaster.studentid = @myid 

replace @myid id parameter , gives coursenames studentid.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -