gridview_SelectedIndexedChanged...
-
here's the situation.. i have the intention to design my "website" to be linked this way. ViewProposal_Admin.aspx (gridview)-> AdminView.aspx. At ViewProposal_Admin.aspx, there is a gridview showing 3 colums, namely Lecturer's Name, Project Title and select column. The column (lecturer's name) has Fonda Hoon, Gary, Cheah Sook Yee, James .... etc. and The column (project title) has abc, def, ghi, jkl, mno.... respectively. My main concern is this: When i click on Select with column Fonda Hoon(Lecturer's name) and abc (project title), i will be redirected to AdminView.aspx, with all the relevant data that is extracted from table (allInformation) in the database, where the data is the entire row where Fonda Hoon and abc can be found. select command: string showAllData ="SELECT * FROM dbo.allInformation WHERE ?????"; the (?????) is the part where i cant figure out.. TIA for any help given. =) -DarkangeL-
-
here's the situation.. i have the intention to design my "website" to be linked this way. ViewProposal_Admin.aspx (gridview)-> AdminView.aspx. At ViewProposal_Admin.aspx, there is a gridview showing 3 colums, namely Lecturer's Name, Project Title and select column. The column (lecturer's name) has Fonda Hoon, Gary, Cheah Sook Yee, James .... etc. and The column (project title) has abc, def, ghi, jkl, mno.... respectively. My main concern is this: When i click on Select with column Fonda Hoon(Lecturer's name) and abc (project title), i will be redirected to AdminView.aspx, with all the relevant data that is extracted from table (allInformation) in the database, where the data is the entire row where Fonda Hoon and abc can be found. select command: string showAllData ="SELECT * FROM dbo.allInformation WHERE ?????"; the (?????) is the part where i cant figure out.. TIA for any help given. =) -DarkangeL-
You can't figure out WHAT to pass to (?????) or you can't figure out HOW to pass the value to it? If its WHAT to pass, then check and see if you have an ID column in your DataBase. If you dont have an ID column then you may have to do something like this:
/*Assuming that Column Names are Lect_Name and Project_Title*/ Select * from YourTableName Where Lect_Name = '" + LectNameValue + "' AND Project_Title = '" + ProjectTitleValue + "'"; /*Where LectNameValue and ProjectTitleValue are the veriables with actual values.*/
If it is the value then you can pass it through query string [key value pair]
http://www.somewebsite.com/default.aspx?MyRecID=10
Where MyRecID is the Key and 10 is the Value Hope that helps :)
-
You can't figure out WHAT to pass to (?????) or you can't figure out HOW to pass the value to it? If its WHAT to pass, then check and see if you have an ID column in your DataBase. If you dont have an ID column then you may have to do something like this:
/*Assuming that Column Names are Lect_Name and Project_Title*/ Select * from YourTableName Where Lect_Name = '" + LectNameValue + "' AND Project_Title = '" + ProjectTitleValue + "'"; /*Where LectNameValue and ProjectTitleValue are the veriables with actual values.*/
If it is the value then you can pass it through query string [key value pair]
http://www.somewebsite.com/default.aspx?MyRecID=10
Where MyRecID is the Key and 10 is the Value Hope that helps :)
-
You can't figure out WHAT to pass to (?????) or you can't figure out HOW to pass the value to it? If its WHAT to pass, then check and see if you have an ID column in your DataBase. If you dont have an ID column then you may have to do something like this:
/*Assuming that Column Names are Lect_Name and Project_Title*/ Select * from YourTableName Where Lect_Name = '" + LectNameValue + "' AND Project_Title = '" + ProjectTitleValue + "'"; /*Where LectNameValue and ProjectTitleValue are the veriables with actual values.*/
If it is the value then you can pass it through query string [key value pair]
http://www.somewebsite.com/default.aspx?MyRecID=10
Where MyRecID is the Key and 10 is the Value Hope that helps :)