1
I have a situation where I would like to position the page in the same position as the container I was in before sending the 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 way : http://localhost:18568/Representative/Index/1#contact
With this example it does not work because it does not recognize the #
return RedirectToAction("index", "Representante", new { id = Session["IdPaginaUsuario"] + "^#contato" });
I guess you’ll have to change the
#
for#
– Jéf Bueno
there is Urlencode ? for Asp.net mvc
– Harry
What do you mean Urlencode?
– Jéf Bueno
http://www.w3schools.com/tags/ref_urlencode.asp
– Harry