ASP.NetÖÐÓÃC#ʵÏÖÕ¾µã¼ÆÊýÆ÷Óû§¿Ø¼þ
asaxÎļþ£º
¡¡¡¡<%@ Control Language="c#" AutoEventWireup="false" Codebehind="counter.ascx.cs" Inherits="JiAnWeb.counter" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
¡¡¡¡<LINK href="css.css" rel="stylesheet">
¡¡¡¡<FONT face="ËÎÌå">
¡¡¡¡<TABLE id="table_counter" cellSpacing="0" cellPadding="0" width="750" align="center" border="0"
¡¡¡¡runat="server">
¡¡¡¡<TR>
¡¡¡¡<TD style="HEIGHT: 23px" align="center" valign=middle><IMG height="1" alt="" src="pic\rightblueback.gif" width="700"></TD>
¡¡¡¡</TR>
¡¡¡¡<TR>
¡¡¡¡<TD align=center valign=middle></TD>
¡¡¡¡</TR>
¡¡¡¡</TABLE>
¡¡¡¡</FONT>
¡¡¡¡£££££££££££££££££££
¡¡¡¡.csÎļþ£º
¡¡¡¡namespace JiAnWeb
¡¡¡¡{
¡¡¡¡using System;
¡¡¡¡using System.Data;
¡¡¡¡using System.Drawing;
¡¡¡¡using System.Web;
¡¡¡¡using System.Web.UI.WebControls;
¡¡¡¡using System.Web.UI.HtmlControls;
¡¡¡¡
¡¡¡¡/// <summary>
¡¡¡¡/// counter µÄժҪ˵Ã÷¡£
¡¡¡¡/// </summary>
¡¡¡¡public class counter : System.Web.UI.UserControl
¡¡¡¡{
¡¡¡¡protected System.Web.UI.HtmlControls.HtmlTable table_counter;
¡¡¡¡
¡¡¡¡private void Page_Load(object sender, System.EventArgs e)
¡¡¡¡{
¡¡¡¡// ÔÚ´Ë´¦·ÅÖÃÓû§´úÂëÒÔ³õʼ»¯Ò³Ãæ
¡¡¡¡string filePath=System.Web.HttpContext.Current.Server.MapPath("hits.txt");
¡¡¡¡System.IO.StreamReader srReadLine = new System.IO.StreamReader(
¡¡¡¡System.IO.File.OpenRead(filePath),
¡¡¡¡System.Text.Encoding.ASCII);//Encoding.DefaultÊǶÁÖÐÎÄ
¡¡¡¡srReadLine.BaseStream.Seek(0, System.IO.SeekOrigin.Begin);//
¡¡¡¡string countStr="";
¡¡¡¡if (srReadLine.Peek() > -1)
¡¡¡¡{
¡¡¡¡countStr+=srReadLine.ReadLine();
¡¡¡¡}
¡¡¡¡int count=int.Parse(countStr)+1;
¡¡¡¡countStr=count.ToString();
¡¡¡¡srReadLine.Close();
¡¡¡¡table_counter.Rows[1].Cells[0].InnerHtml="<font color=\"#009900\">";
¡¡¡¡for (int i=0;i<countStr.Length;i++)
¡¡¡¡{
¡¡¡¡table_counter.Rows[1].Cells[0].InnerHtml=table_c
Ïà¹ØÎĵµ£º
³ÃÖÜÄ©ÏëÕÛÌÚÒ»ÏÂǶÈëASP.NETµÄWinForm³ÌÐò
ÐèÒªÓõ½WebBrowser¿Ø¼þµÄHTMLÔ´Âë¶Áд
¾Í°ÑÒÔǰµÄһЩ´úÂëÆ¬¶ÏÒÆÖµµ½C#ÏÂ
˳±ã·¢¸öÌû×Ó±¸Íü£¬ºÇºÇ
˼·ÆäʵºÜ¼òµ¥£¬Ö±½Óͨ¹ýdocument.documentElement.outerHTML
»òÕßʹÓÃIPersistStreamInit½Ó¿ÚÖ±½Ó¶ÔÁ÷½øÐд¦Àí
ǰÕßÎҾͲ»·Ï»°ÁË£¬ºóÕßʵÏÖ·½·¨ÈçÏÂ
&nbs ......
ÓÃASP.NETÓëSQL SERVER¿ÉÊÇÔµ·Ý×îºÃÁË£¬ÉÔ´óµÄ³ÌÐòÒ»°ãµÚÒ»ÏÈ¿¼ÂǵÄÊÇSQL SERVER£¬Ö»ÊÇһЩºÜ¿¼ÂǾ¼ÃµÄ²ÅʹÓÃACCESSµÈÁË¡£ÓÃSQL SERVER£¬ÎªÁËʹÊý¾Ý¿âµÄЧÂʸüºÃ£¬Ò»°ã¶¼»á²ÅÈ¡´æ´¢¹ý³Ì£¬Òò´æ´¢¹ý³ÌÖ´ÐÐËٶȿ죬²¢ÇÒ¿ÉÒÔʵÏÖһЩ¸ß¼¶µÄ²éѯµÈ¹¦ÄÜ¡£±ÈÈç´«ÈëһЩÊý¾Ý²ÎÊý£¬µ«Ö´ÐеÄSQL¹ý³Ì¿ÉÄܲ»Í¬µÈ¡£
¡¡¡¡ÏÂÃæ¾ÍÀ´¸öÀý× ......
Ò»¡¢Ä¿Ç°ÔÚASP.NETÖÐÒ³Ãæ´«Öµ¹²ÓÐÕâô¼¸ÖÖ·½Ê½£º
1¡¢±íµ¥Ìá½»£¬
<form action= "target.aspx" method = "post" name = "form1">
<input name = "param1" value = "1111"/>
<input name = "param2" value = "2222"/>
</form>
....
for ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
¡¡¡¡2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1 ......
ÔÚ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;
......