int count = Convert.ToInt16(ddlvehicles.SelectedValue);
for (int i = 1; i <= count; i++)
{
cmd.Parameters.Clear();
cmd.CommandText = "usp_booking_insert";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@user_id", ddluname.SelectedValue);
cmd.Parameters.AddWithValue("@journey_place", txtjplace.Text);
cmd.Parameters.AddWithValue("@pickup_date", txtpickup_daterri.Text);
cmd.Parameters.AddWithValue("@pickup_address", txtpickup_address.Text);
cmd.Parameters.AddWithValue("@return_date", txtreturndate.Text);
cmd.Parameters.AddWithValue("@return_address", txtreturn_address.Text);
cmd.Parameters.AddWithValue("@service_id", ddlsname.SelectedValue);
cmd.Parameters.AddWithValue("@mode_of_payment", rdbtnpayment.SelectedItem.ToString());
int vid = Convert.ToInt16(((DropDownList)mvbooking.Views[0].FindControl("ddlvnameri" + i)).SelectedValue);
string vtype = ((DropDownList)mvbooking.Views[0].FindControl("ddlvtype" + i)).SelectedValue;
string vrate = ((DropDownList)mvbooking.Views[0].FindControl("ddlrate" + i)).SelectedValue;
cmd.Parameters.AddWithValue("@vehicle_id",vid);
cmd.Parameters.AddWithValue("@vtype_ac_nonac", vtype);
cmd.Parameters.AddWithValue("@vrate_km_day", vrate);
}
Thanx everyone for your co-operation.. but i solved it