用Visual Studio设计的一个网页,为什么在浏览器中无法运行(错误提示看不懂)?代码和运行截图如下。
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Feedback.aspx.cs" Inherits="tushu.Feedback" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
书名 | /asp:TextBox |
购书 时间 | /asp:TextBox |
本 书 反 馈 | 图书质量: runat="server" RepeatDirection="Horizontal"> asp:ListItem很好/asp:ListItem asp:ListItem好/asp:ListItem asp:ListItem一般/asp:ListItem asp:ListItem差/asp:ListItem /asp:RadioButtonList |
吸引你购买本书的原因:(可多选) asp:ListItem内容提要前言目录等/asp:ListItem asp:ListItem他人推荐/asp:ListItem asp:ListItem版式设计/asp:ListItem asp:ListItem作者或出版社的名声/asp:ListItem asp:ListItem封面设计/asp:ListItem asp:ListItem价格实惠/asp:ListItem /asp:CheckBoxList | |
购 书 信 息 | 1、了解本书的途径: asp:ListItem朋友推荐/asp:ListItem asp:ListItem书店挑选/asp:ListItem 网上查询/asp:ListItem asp:ListItem店员推荐/asp:ListItem asp:ListItem媒体广告/asp:ListItem /asp:ListBox
|
后台的事件还在吗? Button_Click
您说的是什么意思?能具体点吗?(刚学的菜鸟 不太懂)Button按钮的代码如下
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class Feedback:System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("书名:"+ TextBox1.Text + "<br/>");
Response.Write("购书时间: " + TextBox2.Text+"<br/>");
Response.Write("你认为本书的质量是:"+ RadioButtonList1.SelectdValue +"<br/>");
string str1="吸引你购买本书的原因:";
foreach(ListItem item in CheckBoxList1.Item)
if(item.Selected) str1+="<br/> " + item.Value;
Response.Write("吸引你购买本书的原因:"+ str1+"<br/>");
string str2="了解本书的途径:";
foreach(ListItem item in ListBox1.Item)
if(item.Selected) str2+="<br/> "+item.Value;
Response.Write(str2+"<br/>");
Response.Write("购书渠道:"+ TextBox3.Text+"<br/>");
Response.Write("能接收的图书价格:"+TextBox4.Text+"<br/>");
Response.Write("你对本书的发行售后服务评价是:"+DropDownList1.SelectedValue+"<br/>");
Response.Write("你的宝贵意见:"+TextBox5.Text+"<br/>");
Response.Write("姓名:"+TextBox6.Text+"<br/>");
Response.Write("年龄:"+TextBox7.Text+"<br/>");
Response.Write("电话:"+TextBox8.Text+"<br/>");
Response.Write("邮编:"+TextBox9.Text+"<br/>");
Response.Write("邮编地址:"+TextBox10.Text+"<br/>");
}
}
看你的错误应该就是事件没有找到,但是在你cs代码中你事件是有的。
1.重新生成一个事件。然后把原来来那个事件里面的代码粘贴过来。原来那个事件就不要了。清理以下程序,重新生成以下
2.有可能是浏览器缓存问题,可以清楚浏览器缓存试试