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

ASP.NET¶¯Ì¬¼ÓÔØÓû§¿Ø¼þµÄÒ³ÃæÉú³É¹ý³Ì

  MainPageÎļþ£ºWebForm1.aspx
    <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="TestMasterPage.WebForm1" enableViewState="False"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <title>WebForm1</title>
    </HEAD>
    <body MS_POSITIONING="GridLayout">
    <form id="Form1" method="post" runat="server">
    <asp:PlaceHolder id="PlaceHolder1" runat="server"></asp:PlaceHolder></form>
    </body>
    </HTML>
    WebForm1.aspx.cs
    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;
    namespace TestMasterPage
    {
    /// <summary>
    /// WebForm1 µÄժҪ˵Ã÷¡£
    /// </summary>
    public class WebForm1 : System.Web.UI.Page
    {
    protected System.Web.UI.WebControls.PlaceHolder PlaceHolder1; private void Page_Load(object sender, System.EventArgs e)
    {
    //ÔÚ´Ë´¦·ÅÖÃÓû§´úÂëÒÔ³õʼ»¯Ò³Ãæ
    string controlName = "search.ascx";
    UserControl control = (UserControl)LoadControl("~/skins/default/controls/"+ controlName);
    control.ID = "ID_" + controlName; PlaceHolder1.Controls.Add(control); Response.Write("only trace..");
    }
    Web´°ÌåÉè¼ÆÆ÷Éú³ÉµÄ´úÂëWeb´°ÌåÉè¼ÆÆ÷Éú³ÉµÄ´úÂë
    override protected void OnInit(EventArgs e)


Ïà¹ØÎĵµ£º

Ïê½âVS2010ÖÐASP.NET @PageÖ¸ÁîÊôÐÔ

@PageÖ¸ÁîλÓÚÿ¸öASP.NETÒ³ÃæµÄ¶¥²¿£¬¸æËßASP.NETÕâ¸ö¾ßÌåÒ³ÃæÊ¹ÓÃʲôÊôÐÔ£¬ÒÔ¼°¸ÃÒ³Ãæ¼Ì³ÐµÄÓû§¿Ø¼þ¡£ASP.NETÒ³Ãæ
@PageÖ¸ÁîÊôÐÔÓУºAspCompat¡¢Async¡¢AsyncTimeout¡¢AutoEventWireup¡¢Buffer¡¢
ClassName¡¢ClientIDMode¡¢CodeBehind¡¢
CodeFile¡¢CodeFileBaseClass¡¢CodePage¡¢CompilationMode ¡¢ContentType¡¢ ......

asp.net »ñÈ¡¿Í»§¶Ë¼ÆËã»úÃû

asp.net »ñÈ¡¿Í»§¶Ë¼ÆËã»úÃû
1. ÔÚASP.NETÖÐרÓÃÊôÐÔ£º
»ñÈ¡·þÎñÆ÷µçÄÔÃû£ºPage.Server.ManchineName
»ñÈ¡Óû§ÐÅÏ¢£ºPage.User
»ñÈ¡¿Í»§¶ËµçÄÔÃû£ºPage.Request.UserHostName
»ñÈ¡¿Í»§¶ËµçÄÔIP£ºPage.Request.UserHostAddress
2. ÔÚÍøÂç±à³ÌÖеÄͨÓ÷½·¨£º
»ñÈ¡µ±Ç°µçÄÔÃû£ºstatic System.Net.Dns.GetHostNam ......

ÓÃASP.NET×ö¼òÒ×¼ÆËãÆ÷ºÍ¾Å¾Å³Ë·¨±í

¼òÒ×¼ÆËãÆ÷
 
 
1.ÔÚÒ³ÃæÉÏ·ÅÈëTextBox¿Ø¼þºÍdropdownlist¿Ø¼þÒÔ¼°Button¿Ø¼þ,ÐγÉÏÂͼµÄÍâ¹Û.
 
 
 
 
 
 
 
2.ÔÚ×öºÃÒ³ÃæºóË«»÷Button¿Ø¼þ(¼´"="),дÈëÈçÏ´úÂë:
 
using System;
using System.Collections.Generic;
using System.Linq;
using System ......

asp.netÒ³Ãæ¼ä´«ÖµµÄ9ÖÖ·½Ê½

1. Get(¼´Ê¹ÓÃQueryStringÏÔʽ´«µÝ)
     ·½Ê½£ºÔÚurlºóÃæ¸ú²ÎÊý¡£
     ÌØµã£º¼òµ¥¡¢·½±ã¡£
     ȱµã£º×Ö·û´®³¤¶È×Ϊ255¸ö×Ö·û£»Êý¾Ýй©ÔÚurlÖС£
     ÊÊÓÃÊý¾Ý£º¼òµ¥¡¢ÉÙÁ¿¡¢¹Ø¼üµÄÊý¾Ý¡£
     ÊÊÓ÷¶Î ......

·µ»Ø°´Å¥µÄʵÏÖ·½·¨£¨asp.net ÖУ©


·µ»Ø°´Å¥µÄʵÏÖ·½·¨£¨asp.net ÖУ©
Òý×Ô:http://blog.sina.com.cn/s/blog_49df2d0b0100aqoy.html
·µ»ØÉÏÒ»Ò³µÄÕâ¸ö¶«¶«ÔÚÎÒÃÇ×öÏîÄ¿µÄʱºòÒ»°ãÊÇÓÃÓÚÌîдÍê±íµ¥ºóÈ·ÈϵÄʱºò£¬ÓжÔÔ­À´ÊäÈëµÄÊý¾Ý½øÐÐÐÞ¸ÄʱÓõ쬻òÕßÊÇÒòÎªÍøÕ¾ÎªÁË·½±ãä¯ÀÀÕß¶øÓÐÐÄÌí¼Ó µÄÒ»¸ö¶«¶«£¬Ò»°ãÕâÖÖ¹¦ÄܵÄʵÏÖÔÚASP.netÖж¼ÊÇÓÃÒ»¸öbuttonµÄ¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ