Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. gridview_SelectedIndexedChanged...

gridview_SelectedIndexedChanged...

Scheduled Pinned Locked Moved ASP.NET
databasedesignhelpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chubbie
    wrote on last edited by
    #1

    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-

    S 1 Reply Last reply
    0
    • C chubbie

      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-

      S Offline
      S Offline
      student_rhr
      wrote on last edited by
      #2

      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 :)

      C 2 Replies Last reply
      0
      • S student_rhr

        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 :)

        C Offline
        C Offline
        chubbie
        wrote on last edited by
        #3

        hmm.. the thing is i dun want to hardcode the lectname and the project title. i want the server to read the values when i click on the Select link. and extract the whole row of data which had that Lectname and ProjectTitle. TIA. -DarkangeL-

        1 Reply Last reply
        0
        • S student_rhr

          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 :)

          C Offline
          C Offline
          chubbie
          wrote on last edited by
          #4

          erm.. thanks for your help.. i've solved my problem already.. =) -DarkangeL-

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups