列表框输出没有进入asp.net? [英] Listbox output not get in asp.net?
本文介绍了列表框输出没有进入asp.net?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i正在开发asp.net中的小应用程序,下面我附上了ASP代码,我没有得到输出请帮助我
Hi,
i am developing small app in asp.net, below i attached ASP code ,i am not get output kindly help me
<%@ 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>' + ' ' + a + '<br>Album:' + ' ' + 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>
推荐答案
( document )。ready( function (){
// 按钮单击功能
(document).ready(function () { //button click function
(' #Button1')。click( function (){
alert( 成功跨度>);
// var appid =
('#Button1').click(function () { alert("success"); //var appid=
(#appid) .val();
var p1 =
("#appid").val(); var p1 =
这篇关于列表框输出没有进入asp.net?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文