ASP.NET ʵÏÖ¶à°æ±¾語ÑÔ
public class PageBase:System.Web.UI.Page
{
public PageBase()
{
//
// TODO: Add constructor logic here
//
}
protected override void InitializeCulture()
{
//µÃµ½當ǰ語ÑÔ
string currentCulture = (string)Session["Culture"];
//ÅÐ斷當ǰ語ÑÔÊÇ·ñ為¿Õ£¬²¢Ä¬認賦Öµ
if (string.IsNullOrEmpty(currentCulture))
{
currentCulture = "zh-cn";
Session["Culture"] = "zh-cn";
}
//設ÖÃ顯ʾµÄ語ÑÔ類ÐÍ
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(currentCulture);
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(currentCulture);
}
}
Ïà¹ØÎĵµ£º
ÔÚweb configÖÐ ×÷ÈçÏÂÅäÖãº
<connectionStrings>
<add name="ydycon" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=|DataDirectory|ydy.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
ÔÚ.netÎļþÖÐÓ¦ÓÃÁ´½Ó ......
1 Ä¿µÄ
2 ·¶Î§
3 ×¢Ê͹淶
3.1 ¸ÅÊö
3.2 ×Ô½¨´úÂëÎļþ×¢ÊÍ
3.3 Ä£¿é£¨ÀࣩעÊÍ
3.4 ÀàÊôÐÔ×¢ÊÍ
3.5 ·½·¨×¢ÊÍ
3.6 ´úÂë¼ä×¢ÊÍ
4   ......
µÚÒ»ÖÖ·½·¨£º
ͨ¹ýURLÁ´½ÓµØÖ·´«µÝ
send.aspx:
protected void Button1_Click(object sender, EventArgs e)
{
Request.Redirect("Default2.aspx?username=honge");
}
receive.aspx:
string user ......
ÔÚ×î½üµÄÓÃasp.net ¿ª·¢µÄÏîÄ¿ÖУ¬×öÓÅ»¯£¬Òª°ÑÒ³Ãæ¾²Ì¬»¯£¬²éÁ˺ܶàÖÖ·½·¨£¬×îºóÑ¡ÔñÁËÓÃÄ£°åÀ´ÊµÏÖ£¬
×îÖÕÒ³µÄʵÏֱȽϼòµ¥£¬ÔÚÍøÉÏÕÒÁËÒ»¶Î´úÂ룬µ«Ê×Ò³£¬¶þ¼¶Ò³£¬ÁбíÒ³µÄ´¦Àí±¾ÈËÊÇÓõÄÒÔÏ·½°¸£¬ÏÖÔÚ»¹Ö»ÊÇÒ»¸ö±È½Ï¼òµ¥µÄ£¬Ï£ÍûÓдó¼Ò¶à¶àÖ¸µã£¬½»Á÷£»
·½·¨ÈçÏ£º
˼·ÃèÊö£º
1£ ......
Introduction
In this article, we will take a closer look at how ASP.NET pages post back to themselves, and how to customize this feature in our web applications.
function __doPostBack(eventTarget, eventArgument)
One of the most important features of the ASP.NET environment is the ability to decla ......