-------------------------------------------------------------------------------------------
.ASPX
-------------------------------------------------------------------------------------------
.javascript
-------------------------------------------------------------------------------------------
$(document).ready(function () {
loadPeriodo();
});
function loadPeriodo() {
var params = "{}";
jutils.ajax.loadCombo('listaPeriodo', params, 'cbxAgno', 'ID', 'YEAR');
}
-------------------------------------------------------------------------------------------
.HTML
-------------------------------------------------------------------------------------------
<td width="180">
<span id="spanPer">
<select id="cbxAgno" name="cbxAgno" class="cont_combo">
</select>
</span>
</td>
// LLENADO EN DURO
<select id="cbxMes" name="cbxMes" style="font-family: Calibri; font-size: 13px; cursor: default;
width: 135px; height: 21px; margin-left: 0px;">
<option value="1">Abril</option>
<option value="2">Junio</option>
<option value="3">Septiembre</option>
<option value="4">Noviembre</option>
</select>
-------------------------------------------------------------------------------------------
.CS
-------------------------------------------------------------------------------------------
[WebMethod]
public static string listaPeriodo()
{
var dt = new TributarioWebBc().RecuperaAnos();
string result = JsonConvert.SerializeObject(dt).Replace("ö", "o");
return JsonConvert.SerializeObject(dt);
}
No hay comentarios:
Publicar un comentario