Ok folks. I just found a cool Button property called Button.PostBackUrl
. It works fine when you set this property and click on the button -- it takes you the page specified in the PostBackUrl
property. At first glance, it looked very promissing for cross-page coding.
Here's my problem... I have a GridView
in my web form. I've added a column of ButtonField
controls to the grid in hopes that I can pass control to a different page by setting the PostBackUrl
property, alas the ButtonField
control doesn't have this property.
So I went on to put a Button
in my code and set it's PostBackUrl
to my target page. It properly gets sent to the page if I click on the button, but when I programmitically invoke it's Button_Click
event handler, the code doesn't route me to the page specified in the PostBackUrl
property. The idea being that I can fire the Button_Click
event from the GridView
's ButttonField
event handler. Bottom line, the code doesn't get routed to the PostBackUrl
page when programmitically invoking the Button_Click
event.
Can anyone help:?: