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

Îå¡¢ImageMap Àà
      ʹÓà ImageMap ¿Ø¼þ¿ÉÒÔ´´½¨°üº¬¶¨ÒåµÄ×÷ÓõãÇøÓòµÄͼÏñ¡£µ±Óû§µ¥»÷×÷ÓõãÇøÓòʱ£¬´Ë¿Ø¼þ¿ÉÒÔÉú³Éµ½·þÎñÆ÷µÄ»Ø·¢£¬Ò²¿ÉÒÔµ¼º½µ½Ö¸¶¨µÄ URL¡£ÀýÈ磬¿ÉÒÔʹÓô˿ؼþÏÔʾһ·ùµØÀíÇøÓòµÄµØÍ¼¡£Óû§µ¥»÷¸ÃµØÍ¼ÉϵÄÌØ¶¨ÇøÓòʱ£¬´Ë¿Ø¼þ¾Íµ¼º½µ½Ò»¸ö URL£¬¸Ã URL ÌṩÁËÑ¡¶¨ÇøÓòµ ......

File Download Tips for asp.net


use http header
protected void Page_Load(object sender, EventArgs e)
{
string format = Convert.ToString(ViewData["format"]);
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode("·ÑÓñ¨Ïú±í", Encoding.UTF8) + string.Forma ......

asp.netÖÐʵÏÖ¼ò·±Ìåת»¯

1.binÌí¼ÓÒýÓÃChineseConverter.dll
2. Ìí¼Óusing Microsoft.International.Converters.TraditionalChineseToSimplifiedConverter;
  
string strTest = "·±體×Ö";
   
 Response.Write(string.Format("·±ÌåÊä³ö:{0}<br/>", ChineseConverter.Convert(strTest, ChineseCon ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ