我有2个asp.net页面
一个是<%@ 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>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Height="16px" Style="left: 264px; position: relative;
top: 80px" Text="Label"></asp:Label>
<asp:Button ID="Button1" runat="server" Text="Button" style="left: 224px; position: relative; top: 144px" OnClick="Button1_Click" /></div>
</form>
</body>
</html>后台代码一个bunnton按钮通过
string name = "i must be successful";
Response.Redirect("Default2.aspx?aim="+name);
向另外一个页面Default2.aspx发送信息,并且跳转到那个页面Default2.aspx里面接受这个信息显示
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %><!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>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div> </div>
</form>
<%#Request.QueryString["aim"]%>
</body>
</html>为什么在Default2.aspx上面显示不出,传递的数据那,像各位大侠请教
一个是<%@ 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>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Height="16px" Style="left: 264px; position: relative;
top: 80px" Text="Label"></asp:Label>
<asp:Button ID="Button1" runat="server" Text="Button" style="left: 224px; position: relative; top: 144px" OnClick="Button1_Click" /></div>
</form>
</body>
</html>后台代码一个bunnton按钮通过
string name = "i must be successful";
Response.Redirect("Default2.aspx?aim="+name);
向另外一个页面Default2.aspx发送信息,并且跳转到那个页面Default2.aspx里面接受这个信息显示
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %><!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>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div> </div>
</form>
<%#Request.QueryString["aim"]%>
</body>
</html>为什么在Default2.aspx上面显示不出,传递的数据那,像各位大侠请教
解决方案 »
- access中的like语句
- 有的值为什么留不住
- 我这个ASP.NET程序还有方法实现吗???急救!!!
- 小问题:怎么才能取到这种路径呢?
- 求一正则表达式
- 使用requiredfieldvalidator之后出现错误
- 请问谁有通过https://ecpay.com.tw网做在线支付的
- 请问asp.net中有除了html的div之外的具有的控件吗?(急!只有这么点儿分了,请笑纳!)
- 卡了很长时间 asp.net 无法访问APPLET的JAR 包里的类 环境: IIS+WIN2003
- 架设asp.net服务器问题
- The conversion of a char data type to a datetime data type resulted in an out-of-range datetime
- 插入记录是遇到未能找到存储过程的情况
与
<%
Response.Write(Request.QueryString["aim"]);
%>
是一样的。
cs:
protected string aim
{
get
{
return Request.QueryString["aim"];
}
}
前台:
<%#aim%>
学习
<%=Request.QueryString["aim"]%>
又一次看到了钻石``