Cyart
asked on
Stop navigation to PostbackUrl
Hello experts,
I have a hardcoded the value for the PostbackUrl on a asp button and have some validation and sql calls serverside that conditions have to be met in order to proceed. However, if any of the server side validations fail I do not want to navigate using the PostBackurl. How is this possible?
I want to use Postbackurl as I need to post values to the resulting page.
I have a hardcoded the value for the PostbackUrl on a asp button and have some validation and sql calls serverside that conditions have to be met in order to proceed. However, if any of the server side validations fail I do not want to navigate using the PostBackurl. How is this possible?
I want to use Postbackurl as I need to post values to the resulting page.
use an input type submit with runat=server, getting post values on the destination page is as easy as :
Request["contolClientId"]
Request["contolClientId"]
ASKER
Hello,
I do not have control over the destination page, I also tried the dynamic postback but it didn't seem to work
I do not have control over the destination page, I also tried the dynamic postback but it didn't seem to work
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes I need to just thought could use response.redirect and querystring params but did not want to do it that way
With other words do your validation and then use a statement like below in your buttons on_click event
If Validation = true then
button1.postbackurl = "http://someurl.aspx"
else
button1.postbackurl = "http://someotherurl.aspx"
end if
HTH
Joe