Main Page reloads into iframe when selecting other buttons

27 Views Asked by At

I have a page (BANK) with multiple "search by" buttons. I also have a gridview that narrows down by the search options. Once you narrow it down, you can select a button (kit) and in turn another page (CARD) loads into the iframe next to it with all the information about the kit. Everything works well until i use the other search buttons on the page (refine or change what I am searching for). what happens is the whole page(BANK) reloads with-in the iframe itself.

in the Gridview I am using Button "OnClick" event AND "OnClientClick"
The Onclick event is passing variables to the "CARD" page in order to retrieve the right information.

<asp:Button ID="lblStarterKit" runat="server" Text='<%# Bind("StarterKit") %>' Width="500px" Height="45px" CssClass="wrap" OnClick="btnSK_OnClick" CommandArgument='<%#Eval("ID") %>' OnClientClick="target ='cardframe';"> </asp:Button>

protected void btnSK_OnClick(object sender, EventArgs e)

{

GridViewRow row = ((GridViewRow)((Button)sender).NamingContainer); 

int ID = Convert.ToInt32((sender as Button).CommandArgument);
string Functional = (row.FindControl("lblFunction") as Label).Text;
string CardStatus = (row.FindControl("lblCardStatus1") as Label).Text;

Response.Redirect(string.Format("SolutionKitCard_Bank.aspx?ID={0}&Functional={1}&CardStatus={2}", ID, Functional, CardStatus ));

}

I am pretty sure I am missing java script to support this and I have found alot out there. I have tried a few...and its just not working right. Please help.

0

There are 0 best solutions below