Hi, I would like to know if it is possible to redirect to an aspx and move to a section of this same but at the same time by means of href="# ..." currently I have two pages .aspx with a menu, but when I go to the second and want to return, this only redirects me to the first .aspx and I do with the href="" in this way and with this script:
<li><a href="#" onclick="Redirect();">Pagina 2</a></li>
<script>
function Redirect()
{ location.href = "Inicio.aspx"; }
</script>
So far so good, but in addition to this I would like that after addressing the function "skip" as shown in the example:
function saltarA(id, tiempo) {
var tiempo = tiempo || 1000;
$("html, body").animate({ scrollTop: $(id).offset().top }, tiempo);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div>
<ul>
<li><a href="javascript:saltarA('#seccion')">Pagina 1</a></li>
<li><a href="#" onclick="Redirect();">Pagina 2</a></li>
</ul>
</div>
<p><strong>Pagina 1</strong></p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<section id="seccion">
<p><strong>Despues de ser redireccionado, quisiera que se transporte hasta este punto de mi pagina 1</strong></p>
</section>