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. Survey kind of program in "Previous" & "Next" fashion [modified]

Survey kind of program in "Previous" & "Next" fashion [modified]

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestion
1 Posts 1 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.
  • L Offline
    L Offline
    LiYS
    wrote on last edited by
    #1

    Hi all, I'm working on a survey kind of program: There's a set of survey subjects and inside those survey subjects there comes a set of survey questions. What I wanted to do is chain those survey subjects together in a "previous" & "next" fashion, e.g. when I click the next button the page will display the next survey object and same thing happens to "previous" clicking. Is it possible to bind the data to some kind of navigate control or something like below (increment/decrement the VoteID and bind the radio list (survey questions) with another set of data)? What’s the standard way of doing this? Is there any samples? I’m completely new to ASP.net. string strConn = ConfigurationSettings.AppSettings["ConnectionString"]; SqlConnection conn = new SqlConnection(strConn); SqlCommand cmd = conn.CreateCommand(); cmd.CommandText = "GetOptions"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@vote_id", VoteID); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); conn.Open(); da.Fill(ds); rblOptions.DataSource = ds.Tables[0].DefaultView; rblOptions.DataTextField = "content"; rblOptions.DataValueField = "id"; rblOptions.DataBind(); But the "increment/decrement the VoteID" method has drawback once the VoteID's value is not consecutive. Thanks,


    modified on Friday, November 7, 2008 3:04 AM

    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