Question

I have two text boxes using Html.TextboxFor() helper. When I type values in Textbox1 and click outside (moving out the cursor from the textbox), TextBox2 should be populated with TextBox2.

I am aware of that using Javascript/Jquery, fill the values, but i don't an option use any of the client side script. So I have to post the form values to controller action method & fill Textbox1 values with TextBox2 using model object.

how to post/submit form values on textbox focus out event in asp.net mvc2 with out Jquery?

Was it helpful?

Solution

how to post/submit form values on textbox focus out event in asp.net mvc2 with out Jquery?

Perfectly impossible without javascript. You need to subscribe to the onchange event of the first textbox and then trigger the form submission (once again using javascript).

If you cannot use javascript, your only option is to have a submit button on the form that the will submit the form and the corresponding text values once the user clicks on it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top