Group: Forum Members
Posts: 57,
Visits: 496
|
Hello!
I'm wanting to change the PostBackURL on an image button based on the value in a text box. Here's my code:
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
if (this.txtCustomerCode.Text == "8868")
{
this.ImageButton1.PostBackUrl = "~/New Referral.aspx";
}
else
{
this.ImageButton1.PostBackUrl = "";
}
}
Right now - the button doesn't do anything...which is what I want if the Customer Code is incorrect. However - when the code is correct - it still does nothing. Can someone point me in the right direction here?
Thanks - HB
|