Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [OperationContract]
- public List<LightPh> GetI()
- {
- ... here i read a database and populate a list of LigthPH
- }
- public class LightPh
- {
- public int IdImagen { get; set; }
- public string nombre { get; set; }
- public int IdProd { get; set; }
- public byte[] imag { get; set; }
- public bool isp { get; set; }
- }
- <asp:ScriptManager ID="ScriptManager1" runat="server">
- <Services>
- <asp:ServiceReference Path="Serv/JavaAjax.svc" />
- </Services>
- </asp:ScriptManager>
- <script type ="text/javascript">
- var i = 0;
- var imid = 1;
- var l = 0;
- var re;
- function GetValueFromServer() {
- JavaAjax.GetI(onSuccess, onFailure);
- }
- function onSuccess(result) {
- l = result.length;
- re = result;
- go();
- }
- function go() {
- if (l > 0) {
- document.getElementById('TextBox1').value = re[0].nombre;
Add Comment
Please, Sign In to add comment