Click here to Skip to main content
15,914,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i am developing small app in asp.net, below i attached ASP code ,i am not get output kindly help me

XML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Test API</title>
    <script src="Script/jquery-1.2.6.js" type="text/javascript"></script>
    <script src="Script/jquery-1.2.6-vsdoc.js" type="text/javascript"></script>
    <script type="text/javascript">
        document.addEventListener("deviceready", onDeviceReady, false);

        function onDeviceReady() { }
        $(document).ready(function () {

            //button click function
            $('#Button1').click(function () {
                alert("success");
                //var appid=$("#appid").val();
                var p1 = $("#p1").val();

                $.ajax({
                    type: 'POST',
                    url: "https://mindapp-pulpy.rhcloud.com/AuthXmlPulpy",
                    data: {
                        appid: 'MPAPP_0028',
                        p1: p1
                    },

                    dataType: "xml",
                    success: function (data) {

                        alert("Sucess");
                        $(data).find("root").each(function () {
                            a = $(this).find("a").text();
                            b = $(this).find("b").text();
                            //c=$(this).find("c").text();

                            // $.mobile.changePage('#page2');
                            window.location.href = "#Default.aspx";
                            $("#result").append('<li><b>Artist:</b>' + '&nbsp;' + a + '<br>Album:' + '&nbsp;' + b + '</li><br>');
                            $("#result").listview("refresh");


                        });

                    }



                }); //ajax ends

            }); //click function ends




            //$("form")[0].reset();
            $("#Default.aspx #result").empty();


        }); //document ends

</script>
</head>
<body>
    <form id="form1" runat="server">
    <h4 class="temp2">Test App</h4>
    <input type="text" id="p1" name="p1"  class="user-text1 textboxes" />
    </div>
    <asp:Button ID="Button1" runat="server" Text="Submit" onclick="Button1_Click" style="width: 61px" /><br />
    <asp:ListBox ID="result" runat="server" Height="113px" Width="185px"  SelectionMode="Multiple">
    </asp:ListBox>
    </div>
    </form>
</body>
</html>
Posted
Comments
Sergey Alexandrovich Kryukov 5-Aug-14 3:36am    
To start with, what do you mean by "output"? What exactly did you expect?
—SA
chellapandi160 5-Aug-14 4:40am    
hi, thanks for reply
after , readed XML file , i need output a,b value in listbox...
please help me...

1 solution

Through Web Service Are you converting it into jsoon. Is this function goes to success?if yes what are u getting it in Data.?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900