0
Is there any way I can make a code on a button come out, make me return to the page you called? Fixing the page does not give, because this page(query process) is called several other.
I did this and you’re making a mistake:
<span id="sair">
<asp:LinkButton ID="sairbutton" Text="[x] sair" runat="server"
onclick="history.go(-1);" />
</span>
Error:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1026: ) expected
Source Error:
Line 643:
Line 644: <span id="sair">
Line 645: <asp:LinkButton ID="sairbutton" Text="[x] sair" runat="server"
Line 646: onclick="history.go(-1);" />
Line 647: </span>
He says there’s a ")" missing, but where do I put it?
It does not rotate. No more error, but it does not work. My script.
<script type="text/javascript">
function voltarPagina() {
history.go(-1);
}
</script>
My Asp.net
<span id="sair">
<asp:LinkButton ID="sairbutton" Text="[x] sair" runat="server"
OnClientClick="voltarPagina();" />
</span>
No mistake, but do not go back to the page you called, remains on the same page.
Webform. It cannot be Response.Redirect(url);
– pnet
Passing the description of the page called to the "process query" page and clicking that quit button give a Response.Redirect to the value received in the description of the page called. Do you have any impediment to that?
– Arthur Menezes
I can’t fix the return url, because with redirect I would have to define a page, but this page is called other so I can’t fix it by redirect. I think there’s something in javascript, like a back or something.
– pnet
He tried with history.back() ?
– Arthur Menezes
Rectify Linkbutton and test with: <input action="action" type="button" value="[x] quit" onclick="history.go(-1);" />
– Arthur Menezes