A usercontrol in a page with a querystring doesnt postback
I have a usercontrol that is in an asp.net page that contains a button. The event on the button does a simple response.direct all is开发者_如何学JAVA fine if the page doesnt contain a query string however if the page contains a query string. e.g. default.aspx?id=12345
then the postback doesnt occur on the button.
Is this a common issue? what do I need to do to enable postback on the button if there is a querystring?
The presence of a querystring shouldn't cause any problems. Chances are that there is some other code elsewhere that is causing problems on the postback... I'd do some debugging and determine if a) clicking the postback even generates a request to the server b) whether the button event fires on the server and is just failing to do the redirect and if neither of those reveal anything then just scatter breakpoints around your page load event, your onclick event etc. until you can work out what your code is doing.
精彩评论