asp.net跨页投递
1.TextBox txt=(TextBox)PreviousPage.FindControl("TextBox1");
2.在页面注册投递页的属性
<%@ PreviousPageType VirtualPath="crouspostPage.aspx" %>
在crouspostPage.aspx的代码隐藏类中添加
public TextBox TextBox1
{
get(return _textbox);
}
在页面中Response.Write(PreviousPage.TextBox1.Text);
检测跨页投递
if(PreviousPage==null)
{
Response.Weite("sorry,This`s wrong way to invoke me");
Response.End();
return;
}
/////////如果从地址栏输入以下则会抛出异常
if(!PreviousPage.IsCrossPagePostBack)
{
......
}
///在目标页中,测试PreviousPage属性上的IsValid属性,并在答案否定的情况下中止请求
if(!PreviousPage.IsValid)
{
Response.Weite("sorry,This`s wrong way to invoke me");
Response.End();
return;
}
相关文档:
在Web编程过程中,存在着很多安全隐患。比如在以前的ASP版本中,Cookie为访问者和编程者都提供了方便,并没有提供加密的功能。打开IE浏览器,选择“工具”菜单里的“Internet选项”,然后在弹出的对话框里单击“设置”按钮,选择“查看文件”按钮,在弹出的窗口中,就会显示硬盘里 ......
写图片c:\1.jpg到表cinfo中
private static void AddCinfo()
{
string strSql = "insert into cinfo (srvtitle,csttitle,introduction,logo) values
(@srvtitle,@csttitle,@introduction,@logo)";
S ......
asp.net多频道网站开发架构浅析 http://www.cnblogs.com/Kenny-Jiang/archive/2007/07/31/837900.html 背景:
我们打开门户网站时,往往会看到很多排列紧密的频道列表,如“新闻”、“财经”、“娱乐”等。频道为网站提供了方便的导航功能。
内容描述:
......
<HTML><HEAD>
<TITLE>网页特效观止|JsCode.CN|---页面右下角弹出类似QQ或MSN的消息提示</TITLE>
<SCRIPT language=JavaScript>
<!--
/**//*
** ==================================================================================================
**&nbs ......
在ASP.NET中,我们可以用下面的方法实现从数据库中读取图片并显示在页面上,方法如下:
SqlConnection conn=new SqlConnection(ConfigurationSettings.AppSettings["ConnStr"]);
String sql="SELECT image from append where id='" + strID + "'";
&n ......