csharp
public partial class Default3 : System.Web.UI.Page
{
SqlConnection cn = new SqlConnection("server=server;database=Jobrecrutement;uid=sa;password=sa");
SqlDataAdapter adp = new SqlDataAdapter();
DataSet ds = new DataSet();
SqlCommand cmd =new SqlCommand();
protected void Page_Load(object sender, EventArgs e)
{
Wizard WizardControl = new Wizard();
WizardControl.Height = Unit.Pixel(150);
WizardControl.Width = Unit.Pixel(300);
WizardControl.Style["Top"] = "111px";
WizardControl.Style["Left"] = "333px";
WizardControl.Style["Position"] = "absolute";
WizardControl.DisplaySideBar = false;
int j = Convert.ToInt16(Session["qno"]) - 1;
for (int i = 0; i <= j; i++)
{
WizardStepBase newStep = new WizardStep();
newStep.ID = "Step" + (i + 1).ToString();
WizardControl.WizardSteps.Add(newStep);
}
WizardControl.FinishButtonClick += new
WizardNavigationEventHandler(WizardControl_FinishButtonClick);
PlaceHolder1.Controls.Add(WizardControl);
cn.Open();
adp = new SqlDataAdapter("select * from questionpaper where qp_id='" + Session["qpid"].ToString() + "'", cn);
ds.Clear();
adp.Fill(ds);
cn.Close();
for (int i = 0; i < WizardControl.WizardSteps.Count; i++)
{
//Use a variable (ex. A in the code below)
//to tabulate the Image Control and
//RadioButtonList Control for each WizardStep.
//For example, WizardStep1 will
//contain Image1 and RadioButtonList1.
//WizardStep2 will contain Image2 and
//RadioButtonList2 and so on.
int A = i + 1;
Label Labelcontrol=new Label();
Labelcontrol.ID = "Label" + A.ToString();
Labelcontrol.Width = Unit.Pixel(200);
Labelcontrol.Height = Unit.Pixel(25);
WizardControl.WizardSteps[i].Controls.Add(Labelcontrol);
Labelcontrol.Text = ds.Tables[0].Rows[i].ItemArray[2].ToString();
RadioButtonList RadioButtonListControl = new RadioButtonList();
RadioButtonListControl.ID = "RadioButtonList" + A.ToString();
WizardControl.WizardSteps[i].Controls.Add(RadioButtonListControl);
RadioButtonList RBL = (RadioButtonList)
WizardControl.WizardSteps[i].FindControl(
"RadioButtonList" + A.ToString());
RBL.Width = Unit.Pixel(180);
RBL.Height = Unit.Pixel(100);
RBL.Items.Clear();
for (int x = 3; x < 7; x++)
{
RBL = (RadioButtonList)
WizardControl.WizardSteps[i].FindControl(
"RadioButtonList" + A.ToString());
RBL.Items.Add(new ListItem(
ds.Tables[0].Rows[i].ItemArray[x].ToString().Trim()));
}
}
}
iwant the remaining code to use next and previous so that previous page should be shown as it was.
Mod Edit: Please use code tags when posting your code. Code tags are used like so =>

Thanks,
PsychoCoder