Question

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

Était-ce utile?

La solution 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"/>

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top