Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.netÉú³É¾²Ì¬ÍøÒ³

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Text;
namespace xmlDemo
{
/**//// <summary>
/// staticWeb µÄժҪ˵Ã÷¡£
/// </summary>
public class staticWeb : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.TextBox TextBox2;
protected System.Web.UI.WebControls.TextBox TextBox3;
protected System.Web.UI.WebControls.Button Button1;
private void Page_Load(object sender, System.EventArgs e)
{
// ÔÚ´Ë´¦·ÅÖÃÓû§´úÂëÒÔ³õʼ»¯Ò³Ãæ
}
public bool WriteFile(string strText,string strContent,string strAuthor)
{
string path = Server.MapPath("~/news/");
Encoding code = Encoding.GetEncoding("gb2312");
// ¶ÁÈ¡Ä£°åÎļþ
string temp = Server.MapPath("~/news/text.htm");
StreamReader sr=null;
StreamWriter sw=null;
string str="";
try
{
sr = new StreamReader(temp, code);
str = sr.ReadToEnd(); // ¶ÁÈ¡Îļþ
}
catch(Exception exp)
{
HttpContext.Current.Response.Write(exp.Message);
HttpContext.Current.Response.End();
sr.Close();
}
string htmlfilename=DateTime.Now.ToString("yyyyMMddHHmmss")+".htm";
// Ìæ»»ÄÚÈÝ
// Õâʱ,Ä£°åÎļþÒѾ­¶ÁÈëµ½Ãû³ÆΪstrµÄ±äÁ¿ÖÐÁË
str =str.Replace("ShowArticle",strText); //Ä£°åÒ³ÖеÄShowArticle
str = str.Replace("biaoti",strText);
str = str.Replace("content",strContent);
str = str.Replace("author",strAuthor);
// дÎļþ
try
{
sw = new StreamWriter(path + htmlfilename , false, code);
sw.Write(str);
sw.Flush();
}
catch(Exception ex)
{
HttpContext.Current.Response.Write(ex.Message);
HttpContext.Current.Response.End();
}
finally
{
sw.Close();
}
return true;


Ïà¹ØÎĵµ£º

ASP.NET CookieʹÓÃ


1.ʲôÊÇcookie?
cookie ÊÇһС¶ÎÎı¾ÐÅÏ¢£¬°éËæÓû§ÇëÇó£¬ÔÚweb·þÎñÆ÷ºÍä¯ÀÀÆ÷Ö®¼ä´«µÝ¡£Óû§Ã¿´Î·ÃÎÊÕ¾µãµÄʱºò£¬
webÓ¦ÓóÌÐò¶¼¿ÉÒÔ¶ÁÈ¡cookie°üº¬µÄÐÅÏ¢¡£
¼ÙÉèÔÚÓû§ÇëÇóÄúµÄÍøÕ¾µÄij¸öÒ³Ãæʱ£¬ÄúµÄÓ¦ÓóÌÐò²»½öÊÇ·µ»ØÇëÇóµÄÒ³Ã档ͬʱҲ·µ»ØÒ»¸ö°üº¬ÈÕÆÚ
ºÍʱ¼äµÄcookie¡£Óû§µÄä¯ÀÀÆ÷ÔÚ»ñµÃÒ³ÃæµÄͬʱҲ»ñµÃ ......

asp.netʵÏÖÎļþÉÏ´«´ø½ø¶ÈÌõ£¨¶àÖÖ·ç¸ñ£©

ÎļþÉÏ´« ´ø½ø¶ÈÌõ ¶àÖÖ·ç¸ñ ·Ç³£Æ¯ÁÁ£¡
²¿·Ö´úÂ룺
<form id="form1" runat="server">
<asp:ScriptManager ID="scriptManager" runat="server" EnablePageMethods="true" />
<script type="text/javascript">
var intervalID = 0;
var progressBar;
var fileUpload;
var form;
// ½ø¶ÈÌõ
fu ......

SharpDevelop¿ª·¢Asp.net

ÉèÖÃSharpDevelop£¬Ê¹ÆäÄܱàдºÍÔËÐÐAsp.net¡£
ÔÚ¿´ÏÂÎĵÄʱºò£¬ÇëÈ·¶¨ÄúµÄϵͳװÉÏÁËIIS£¬FontPageÀ©Õ¹£¬×°ÁË.Net¿ò¼Ü¡£ºÃÏÖÔÚ¿ªÊ¼ÎҵĽ²Êö¡£
     Èç¹ûÄú×°µÄ.Net¿ò¼ÜÊÇ1.1°æµÄ£¬ÇëÉú³ÉÒÔÏÂBATÎļþ¡£
     Îļþ£ºAsp.Net_1.1_Setup.bat
     c:
  ......

Asp.net ÊÂÎñ´¦Àí

ÊÂÎñ´¦ÀíÊÇÔÚÊý¾Ý´¦Àíʱ¾­³£Óöµ½µÄÎÊÌ⣬¾­³£Óõ½µÄ·½·¨ÓÐÒÔÏÂ3ÖÖ×ܽáÕûÀíÈçÏ£º ·½·¨1£ºÖ±½ÓдÈëµ½sql ÖÐ ÔÚ´æ´¢¹ý³ÌÖÐʹÓà BEGIN TRANS, COMMIT TRANS, ROLLBACK TRANS ʵÏÖ  Óŵ㣺ÊÂÎñÂß¼­°üº¬ÔÚÒ»¸öµ¥¶ÀµÄµ÷ÓÃÖУ¬ÓÐÔËÐÐÒ»¸öÊÂÎñµÄ×î¼ÑÐÔÄÜ£¬Á¢ÓÚÓ¦ÓóÌÐò¡£ÏÞÖÆ£º ÊÂÎñÉÏÏÂÎĽö´æÔÚÓÚÊý¾Ý¿âµ÷ÓÃÖУ¬Êý¾Ý¿â´úÂëÓëÊ ......

ASP.NET Session Ïê½â

SessionÄ£Ðͼò½é
SessionÊÇʲôÄØ£¿¼òµ¥À´Ëµ¾ÍÊÇ·þÎñÆ÷¸ø¿Í»§¶ËµÄÒ»¸ö±àºÅ¡£µ±Ò»Ì¨WWW·þÎñÆ÷ÔËÐÐʱ£¬¿ÉÄÜÓÐÈô¸É¸öÓû§ä¯ÀÀÕýÔÚÔËÕýÔÚÕą̂·þÎñÆ÷ÉϵÄÍøÕ¾¡£µ±Ã¿¸öÓû§Ê״κÍÕą̂WWW·þÎñÆ÷½¨Á¢Á¬½Óʱ£¬Ëû¾ÍºÍÕâ¸ö·þÎñÆ÷½¨Á¢ÁËÒ»¸öSession£¬Í¬Ê±·þÎñÆ÷»á×Ô¶¯ÎªÆä·ÖÅäÒ»¸öSessionID£¬ÓÃÒÔ±êʶÕâ¸öÓû§µÄΨһÉí·Ý¡£Õâ¸öSessionI ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ