Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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("~/s


Ïà¹ØÎĵµ£º

ASP.NET

      HyperLink Web ·þÎñÆ÷¿Ø¼þ¿ÉÔÚÍøÒ³ÉÏ´´½¨Á´½Ó£¬Ê¹Óû§¿ÉÒÔÔÚÓ¦ÓóÌÐòÖеÄÒ³¼äÒƶ¯¡£
 
Ò»¡¢±³¾°
ʹÓà HyperLink ¿Ø¼þµÄÖ÷ÒªÓŵãÊÇ¿ÉÒÔÔÚ·þÎñÆ÷´úÂëÖÐÉèÖÃÁ´½ÓÊôÐÔ¡£ÀýÈ磬Äú¿ÉÒÔ¸ù¾ÝÒ³ÃæÖеÄÌõ¼þ¶¯Ì¬¸ü¸ÄÁ´½ÓÎı¾»òÄ¿±êÒ³¡£
°²È«ËµÃ÷£º Ó볬Á´½ÓÏà¹ØÁªµÄ URL ¿ÉÄܻᱻÓû§¶ñÒâ´Û¸ ......

Asp.net×Ô¶¨ÒåÑéÖ¤¿Ø¼þCustomValidator µÄʹÓ÷½·¨

javascript º¯Êý ºÍ CustomValidator¿Ø¼þÏà½áºÏʹÓÃ
<asp:TextBox ID="txtPwdPrompt" runat="server"></asp:TextBox>
<asp:CustomValidator id="CVPwdPrompt" runat="server" ClientValidationFunction="CheckPwd" ControlToValidate="txtPwdPrompt" ErrorMessage="<span style='font:12px'>ÌáʾÎÊÌ ......

Asp.Netǰ̨µ÷Óúǫ́±äÁ¿

Asp.NetÖм¸ÖÖÏàËƵıê¼Ç·ûºÅ: < %=...%>< %#... %>< % %>< %@ %>½âÊͼ°Ó÷¨
´ð: < %#... %>: ÊÇÔڰ󶨿ؼþDataBind()·½·¨Ö´ÐÐʱ±»Ö´ÐУ¬ÓÃÓÚÊý¾Ý°ó¶¨
Èç: < %# Container.DataItem("tit") %>
< %= %>: ÔÚ³ÌÐòÖ´ÐÐʱ±»µ÷Ó㬿ÉÒÔÏÔʾºǫ́±äÁ¿Öµ
Èç:
*.aspxÖУº & ......

ASP.NET

      ListBox Web ·þÎñÆ÷¿Ø¼þʹÓû§Äܹ»´ÓÔ¤¶¨ÒåµÄÁбíÖÐÑ¡ÔñÒ»Ïî»ò¶àÏî¡£
 
Ò»¡¢·½°¸
ÈôÒªÒ»´ÎÏÔʾ¶à¸öÏʹÓû§Äܹ»´ÓÔ¤¶¨ÒåÁбíÖÐÑ¡ÔñÒ»¸ö»ò¶à¸öÏÇëʹÓà ListBox Web ·þÎñÆ÷¿Ø¼þ¡£ListBox ¿Ø¼þÓë DropDownList ¿Ø¼þµÄ²»Í¬Ö®´¦ÔÚÓÚ£¬Ëü¿ÉÒÔÒ»´ÎÏÔʾ¶à¸öÏʹÓû§Äܹ»Ñ¡Ôñ¶à¸öÏî£ ......

ASP.NET

¿ÉÒÔʹÓà Literal Web ·þÎñÆ÷¿Ø¼þ×÷ΪҳÃæÉÏÆäËûÄÚÈݵÄÈÝÆ÷¡£
 
Ò»¡¢·½°¸
Literal ×î³£ÓÃÓÚÏòÒ³ÃæÖж¯Ì¬Ìí¼ÓÄÚÈÝ¡£
 
¶þ¡¢±³¾°
Literal ¿Ø¼þ±íʾÓÃÓÚÏòÒ³ÃæÌí¼ÓÄÚÈݵļ¸¸öÑ¡ÏîÖ®Ò»¡£¶ÔÓÚ¾²Ì¬ÄÚÈÝ£¬ÎÞÐèʹÓÃÈÝÆ÷£¬¿ÉÒÔ½«±ê¼Ç×÷Ϊ HTML Ö±½ÓÌí¼Óµ½Ò³ÃæÖС£µ«ÊÇ£¬Èç¹ûÒª¶¯Ì¬Ìí¼ÓÄÚÈÝ£¬Ôò±ØÐ뽫ÄÚÈÝÌí¼Óµ½ÈÝÆ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ