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