I have a check box for "IsQuantityAvailable" for selecting if a seller have availability of commodities and on CLICK of this chkBox I have to show a TextBox for entering quantity of commodity.Please suggest a solution using MVC Razor...Thanks!!
As mario suggested, the solution hasn't much to do with razor, however this might help. Create the checkbox using Html.Checkbox or Html.CheckboxFor if u have strict model binding. Add onclick eventhandler to checkbox while adding
@Html.Checkbox( "somename", new { @onclick="function-to-open-dialog()"})
Implementation of "function-to-open-dialog" will depend upon what you are using at client site. If its jquery then it could be simple call like $("#DialogId").dialog("open")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With