Retrieving 2 SQL querry from one page to other using hyperlink GridView?

Not sure what exactly is the issue that your are facing - only thing that amiss in your code is type for QueryStringParameter.

Up vote 0 down vote favorite share g+ share fb share tw.

Greetings everyone, I have a code to pass the querry from a one page that has a gridview hyperlink but what I didn't know is how to retrieve it.. Here is my code I hope you could help me fix this one.. thnx Have a nice day ^^, Default1. Aspx(Gridview1) page: " SelectCommand="SELECT tblCourses. Course_id, tblCourses.

Course_cat, tblSections. Section_id, tblSections. Section_name, tblSections.

No_of_students FROM tblCourses CROSS JOIN tblSections GROUP BY tblCourses. Course_id, tblCourses. Course_cat, tblSections.

Section_id, tblSections. Section_name, tblSections. No_of_students"> Default2.

Aspx(Gridview2) Page: ' /> ' /> ' /> ' /> " OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT tblStudents. StudentID, tblStudents. LastName, tblStudents.

FirstName, (SELECT section_name FROM tblSections AS tblSections_1 WHERE (tblStudentSubject. Section_id = section_id)) AS section_name, (SELECT course_cat FROM tblCourses AS tblCourses_1 WHERE (tblStudentSubject. Course_id = course_id)) AS course_cat FROM tblStudentSubject INNER JOIN tblStudents ON tblStudentSubject.

Student_id = tblStudents. StudentID INNER JOIN tblCourses AS tblCourses ON tblStudentSubject. Course_id = tblCourses.

Course_id INNER JOIN tblSections AS tblSections ON tblStudentSubject. Section_id = tblSections. Section_id WHERE (tblStudentSubject.

Section_id = @section_id) AND (tblStudentSubject. Course_id = @course_id) ORDER BY tblStudents. LastName"> c# .net asp.net vb.net .

Net-3.5 link|improve this question edited Aug 20 '10 at 8:11 asked Aug 19 '10 at 16:24Kid386 57% accept rate.

Thanks for the response VinayC, My problem is I have my Default1. Aspx and a hyperlink data in gridview1 which is named as View Student ...when I clicked it.. I am expecting that it will pass the section_id and course_id data into Default2. Aspx that needs the section_id and course_id data to filter the gridview2.. but my gridview2 doesn't appear..that's my problem.. – Kid Aug 20 '10 at 7:56 I have used "ClassList.

Aspx" in your hyperlink instead of default2.aspx. But assuming that just for asking question, when you click on link, does query parameters get passed correctly? I mean do you see those correct values in url?

If yes then check if query for those parameters return zero rows or not. If there are zero rows you won't see anything unless you provide EmptyDataTemplate or EmptyDataText. – VinayC Aug 20 '10 at 11:03 i'd like to give you +1 but it says I don't have enough reputation ^^, thanks again – Kid Aug 20 '10 at 17:14.

Thanks for your response and time VinayC.. I finally figured it out on my own.. with the tip on your answer... thanks again ^^, Here's The Formal code SubjectClass. Aspx w/c I named as (Default1. Aspx(Gridview1)) in my sample " SelectCommand="SELECT tblStudentSubject.

Course_id, tblStudentSubject. Section_id, tblCourses. Course_cat, tblSections.

Section_name, tblSections. No_of_students FROM tblStudentSubject INNER JOIN tblCourses ON tblStudentSubject. Course_id = tblCourses.

Course_id INNER JOIN tblSections ON tblStudentSubject. Section_id = tblSections. Section_id GROUP BY tblStudentSubject.

Course_id, tblStudentSubject. Section_id, tblCourses. Course_cat, tblSections.

Section_name, tblSections. No_of_students"> ClassList. Aspx w/c I named as (Default2.

Aspx(Gridview2)) in my sample " SelectCommand="SELECT tblStudents. LastName, tblStudents. FirstName, tblSections.

Section_name, tblCourses. Course_cat, tblStudentSubject. Section_id, tblStudentSubject.

Course_id FROM tblStudentSubject INNER JOIN tblStudents ON tblStudentSubject. Student_id = tblStudents. StudentID INNER JOIN tblSections ON tblStudentSubject.

Section_id = tblSections. Section_id INNER JOIN tblCourses ON tblStudentSubject. Course_id = tblCourses.

Course_id WHERE (tblStudentSubject. Section_id = @section_id) AND (tblStudentSubject. Course_id = @course_id).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions