谢谢大家的帮助!到目前为止,在这个网站上有一些真正有用的答案,所以我希望再多一次。.aspx文件帮助
我想创建也正是这一点,但我仍然有问题
http://www.webonweboff.com/widgets/ajax/ajax_linked_selection.aspx
我抄HTML和JavaScript的词字,并保存该文件作为index.html的(但显然与开闭html和body标签)
的文件我已经叫ajaxServer.aspx.cs具有下面的代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "text/javascript";
string id = Request.QueryString.Get("id");
string action = Request.QueryString.Get("action");
StringBuilder returnString = new StringBuilder();
/*
Retrieve the data based on values "id" and "action"
and build a response string in this format:
[{text:"...",
*
* value:"...",selected:false},
{text...}]
No final ";" is necessary
For example:
returnString.Append("[{text:\"California\",value:\"CA\",selected:false}," +
"{text:\"OH\",value:\"Ohio\",selected:false}," +
"{text:\"NY\",value:\"New York\",selected:true}]");
*/
Response.Write(returnString.ToString());
}
}
我已经叫ajaxServer.aspx文件中有如下代码:
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="ajaxServer.aspx.cs" Inherits="_Default" %>
其他(.js文件)我已经下载并保存的文件。当我运行.html文件时出现以下错误:
错误提取数据!
网址:ajaxServer.asp
方法:GET
PARAMS:动作=状态,文化= EN-US
的readyState:4
状态:403
头:服务器:ASP.NET Development Server/10.0.0.0 日期:Sun,19 Jun 2011 20:39:55 GMT X-AspNet-Version:4.0.30319 Cache-Control:private Content-Type:text/html; charset = utf-8 内容长度:2126 连接:关闭
- >任何线索任何人?再一次感谢您提前提供的所有帮助!
回答后不要删除问题。它可能会帮助其他人在未来 – citronas