Pergunta

Can any one tell , How to submit a form on anchor link click without script in asp.net mvc2?

Foi útil?

Solução 2

I removed the anchor & used button with css

.link
{ 
   background-color: Transparent;                 
   text-decoration: underline;                 
   color: blue;
   cursor: pointer; 
   border:0
}   

Need to show Next as button text & posting the diffent value to controller(i.e. submiting button value itself)

<button type="submit" class="link" Value="10">
   Next
</button>

Below code for normal form post.

<input type="submit" class="link" Value="Click"/>

Outras dicas

You need to either use a submit button or javascript to submit a form. If you can't style the submit button to the look you want, then you will be stuck with javascript.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top