When I select a TranCode from a dropdownlist generated from the database, how can it automatically set the assigned TabNo to active and display the Type in a label?
I'm using bootstap and I'm not using the entity framework, just comment if you want to see all the code, thanks.
Table:
TranCode-----TabNo-----Type
100100-------1---------Cash
100101-------1---------Card
100102-------2---------Card
100103-------3---------Cash
100104-------1---------Cash
100105-------3---------Card
100106-------3---------Cash
Index.chtml
<select class="form-control">
@foreach (System.Data.DataRow dr in Model.Transactions.Rows)
{
<option>@dr["TranCode"].ToString()</option>
}
</select>
<label id="lblType" for="lblTypeValue">Type: </label>
<label id="lblTypeValue">N/A</label>
<div class="panel-heading">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1default" data-toggle="tab">Tab 1</a></li>
<li><a href="#tab2default" data-toggle="tab">Tab 2</a></li>
<li><a href="#tab3default" data-toggle="tab">Tab 3</a></li>
</ul>
</div>
jQuery.ajaxwhich passing data fromTranCodeselection to a controller method & returns JSON response to fillTabNo&Typedepending onTranCoderequest. What you're trying so far to achieve it in client-side context?