I have a situation where I would like to position the page in the same position as the container where it was before sending Get?
Example:
<!-- ==== contato ==== -->
<div class="container" id="contato" name="contato">
<div class="row">
@Html.Partial("_PartialMensagens")
@using (Html.BeginForm("CadastroContato", "Representante", FormMethod.Get))
{
<form>
<div class="form-group">
<input type="text" class="form-control" id="ContatoNome" name="ContatoNome" required placeholder="Nome"><br />
<input type="text" class="form-control" id="Telefone" name="Telefone" required placeholder="Celular"><br />
<input type="text" class="form-control" id="ContatoCidade" name="ContatoCidade" required placeholder="Cidade UF"><br>
<textarea rows="4" cols="30" name="Mensagem" id="Mensagem" class="form-control" required placeholder="Mensagem..."></textarea>
<br>
<button type="submit" class="btn btn-success">Enviar</button>
</div>
</form>
}
</div><!-- row -->
</div><!-- container -->
<!-- ==== contato ==== -->
I would need to return this path: link
This example does not work because it does not recognize the
return RedirectToAction("index", "Representante", new { id = Session["IdPaginaUsuario"] + "^#contato" });