页面数据载入中,请等待...
 
[asp.net学习专区]asp.net技术的学习顺序问题
[ 2007-7-29 21:10:00 | By: chenxueyong ]
 
第一步 掌握一门.NET面向对象语言,C#或VB.NET。
       强烈反对在没系统学过一门面向对象语言的前提下去学ASP.NET。
       ASP.NET是一个全面向对象的技术,不懂那绝对学不下去!
第二步 对.NET work类库有一定的了解
       可以通过开发Windows Form应用程序来学习.NET work。ASP.NET是建构在.NET 
work之上的技术,你对.NET  work了解得越深,学习ASP.NET就越快。
       举个例子:下面简单列出几个对掌握ASP.NET非常重要的概念:
       对象的内存模型,委托,事件,多线程,程序集和应用程序域,安全模型
 .NET  work当然还有许多其它的东西,但不理解与把握清楚上述这些东西,是很难真正把握ASP.NET的。
……
 
 
 
[asp.net学习专区]ASP.NET生成静态页面实现方法
[ 2007-7-28 21:15:00 | By: chenxueyong ]
 

<!--Main.Aspx-->
<%@ page language="C#" %>
<%@ import namespace=System.IO %>
< runat="server">
protected override void OnInit (EventArgs e)
{
  int id;
  try
  {
    (Request.QueryString["id"]);
  }
  catch
  {
    throw (new Exception ("页面没有指定id"));
  }
 
  string filename=Server.MapPath("statichtml_"+id+".html");
 
  //尝试读取已有文件
  Stream s = GetFileStream (filename);
  if (s != null)//如果文件存在并且读取成功
  {
    using (s)
    {
      Stream2Stream (s, Response.OutputStream);
      Response.End ();
……

 
 
 
[asp.net学习专区]技巧实例:ASP.NET生成静态页面实现方法
[ 2007-7-28 21:12:00 | By: chenxueyong ]
 
环境:Microsoft .NET work SDK v1.1
OS:Windows Server 2003 中文版
ASP.Net生成静态HTML页
在Asp中实现的生成静态页用到的FileSystemObject对象!
在.Net中涉及此类操作的是System.IO

Code:

//生成HTML页
public static bool WriteFile(string strText,string strContent,string strAuthor)
{
string path = HttpContext.Current.Server.MapPath("/news/");
Encoding code = Encoding.GetEncoding("gb2312");
// 读取模板文件
string temp = HttpContext.Current.Server.MapPath("/news/text.html");
StreamReader sr=null;
StreamWriter sw=null;
string str="";
try
{
sr = new StreamReader
……
 
 
 
[asp.net学习专区]ASP.Net开发常见问题
[ 2007-7-28 21:11:00 | By: chenxueyong ]
 
1. 打开新的窗口并传送参数:

传送参数:

response.write("<>open

('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</>")

接收参数:

string a  = Request.QueryString("id");

string b  = Request.QueryString("id1");

2.为按钮添加对话框

Button1.Attributes.Add("","return confirm('确认?')");

button.attributes.add("","if(confirm('are you sure...?
……
 
 
首页 上一页 下一页 尾页 页次:1/14页  4篇日志/页 转到:
页面数据载入中,请等待...
页面数据载入中,请等待...

时间记忆

页面数据载入中,请等待...

最新日志

页面数据载入中,请等待...

最新评论

页面数据载入中,请等待...

最新留言

页面数据载入中,请等待...

搜 索

用户登录

页面数据载入中,请等待...

友情连接

免费注册:阳光博客群

页面数据载入中,请等待...