P
Paul Fi
I have this page Index.aspx, page code shown below:
void Page_Load(object sender, EventArgs e) {
if (IsPostBack) {
if (this.drpTypeOfStock.SelectedIndex != 0)
Server.Transfer("SearchStockType.aspx");
}
//Connection Configuration
ConnToDB();
drpTypeOfStock.DataSource=CreateDataSource();
}
public string StockType {
get{
return this.drpTypeOfStock.SelectedItem.Text;
}
}
private ICollection CreateDataSource() {
ArrayList Types = new ArrayList();
Types.Add("");
while (this.sqlDataReader1.Read()) {
Types.Add(this.sqlDataReader1.GetString(0));
}
return Types;
}
void btnRecentAcquisitions_Click(object sender, EventArgs e) {
Response.Redirect("SearchRecentAcquisitions.aspx");
}
void btnAntiques_Click(object sender, EventArgs e){
Response.Redirect("SearchAntiques.aspx");
}
void drpTypeOfStock_SelectedIndexChanged(object sender, EventArgs e) {
}
Ok here is the scenario, Index.aspx has dropdownlist (its autopostback
is set to true) and 2 button and when Index.aspx is first loaded the
dropdown is populated with entries from a column of sql database table,
now if i choose from that list, I postback and transfered to
SearchStockType.aspx to display results of my selection, now i want to
go back to page1 by clicking on the Back button of the browser then I
click on any of the two buttons to go to another page, say
SearchAntiques.aspx, I end up going back to SearchStockType.aspx which
is the same page that i displayed earlier when i made that selection of
the drop down list, can some one tell me how i can solve this problem?
void Page_Load(object sender, EventArgs e) {
if (IsPostBack) {
if (this.drpTypeOfStock.SelectedIndex != 0)
Server.Transfer("SearchStockType.aspx");
}
//Connection Configuration
ConnToDB();
drpTypeOfStock.DataSource=CreateDataSource();
}
public string StockType {
get{
return this.drpTypeOfStock.SelectedItem.Text;
}
}
private ICollection CreateDataSource() {
ArrayList Types = new ArrayList();
Types.Add("");
while (this.sqlDataReader1.Read()) {
Types.Add(this.sqlDataReader1.GetString(0));
}
return Types;
}
void btnRecentAcquisitions_Click(object sender, EventArgs e) {
Response.Redirect("SearchRecentAcquisitions.aspx");
}
void btnAntiques_Click(object sender, EventArgs e){
Response.Redirect("SearchAntiques.aspx");
}
void drpTypeOfStock_SelectedIndexChanged(object sender, EventArgs e) {
}
Ok here is the scenario, Index.aspx has dropdownlist (its autopostback
is set to true) and 2 button and when Index.aspx is first loaded the
dropdown is populated with entries from a column of sql database table,
now if i choose from that list, I postback and transfered to
SearchStockType.aspx to display results of my selection, now i want to
go back to page1 by clicking on the Back button of the browser then I
click on any of the two buttons to go to another page, say
SearchAntiques.aspx, I end up going back to SearchStockType.aspx which
is the same page that i displayed earlier when i made that selection of
the drop down list, can some one tell me how i can solve this problem?