http://www.knowsky.com/5723.html
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;
using System.IO;
using System.Drawing.Imaging;
namespace eMeng.Exam
{
/// <summary>
/// Thumbnail µÄժҪ˵Ã÷¡£
/// </summary>
public class Thumbnail : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Button Button1;
private void Page_Load(object sender, System.EventArgs e)
{
// ÔÚ´Ë´¦·ÅÖÃÓû§´úÂëÒÔ³õʼ»¯Ò³Ãæ
Label1.Text = "<h3>ÔÚASP.NETÀïÇáËÉʵÖËõÂÔÍ?lt;/h3>";
Button1.Text = "ÉÏÔز¢ÏÔʾËõÂÔͼ";
}
#region Web ´°ÌåÉè¼ÆÆ÷Éú³ÉµÄ´úÂë
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: ¸Ãµ÷ÓÃÊÇ ASP.NET Web ´°ÌåÉè¼ÆÆ÷Ëù±ØÐèµÄ¡£
//
InitializeCompo ......
http://www.knowsky.com/5723.html
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;
using System.IO;
using System.Drawing.Imaging;
namespace eMeng.Exam
{
/// <summary>
/// Thumbnail µÄժҪ˵Ã÷¡£
/// </summary>
public class Thumbnail : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Button Button1;
private void Page_Load(object sender, System.EventArgs e)
{
// ÔÚ´Ë´¦·ÅÖÃÓû§´úÂëÒÔ³õʼ»¯Ò³Ãæ
Label1.Text = "<h3>ÔÚASP.NETÀïÇáËÉʵÖËõÂÔÍ?lt;/h3>";
Button1.Text = "ÉÏÔز¢ÏÔʾËõÂÔͼ";
}
#region Web ´°ÌåÉè¼ÆÆ÷Éú³ÉµÄ´úÂë
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: ¸Ãµ÷ÓÃÊÇ ASP.NET Web ´°ÌåÉè¼ÆÆ÷Ëù±ØÐèµÄ¡£
//
InitializeCompo ......
Microsoft ASP.NET AJAX¿ÉÒԺܷ½±ãµÄÈÃÎÒÃÇÔÚ¿Í»§¶ËʹÓýű¾µ÷ÓÃASP.NET Web
Services(.asmx),ÒªÆôÓÃÕâÒ»ÌØÐÔ£¬ÏñÇ°ÃæÌáµ½µÄÒ»Ñù£¬±ØÐëÒªÅäÖÃWeb.Config£¬¿ÉÒÔ²ÎÕÕMicrosoft ASP.NET
AJAX°²×°Ä¿Â¼ÏµÄWeb.Config£¬Èç¹ûÊÇͨ¹ýASP.NET AJAX-enabled Web
siteÄ£°æ½¨Á¢µÄÕ¾µã£¬Ôò²»ÐèÒªÔÙ½øÐÐÉèÖÃÁË¡£ÅäÖýڵãÈçÏ£º
<system.web>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx"
validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory"/>
</httpHandlers>
<system.web>
ÒÔÉÏÅäÖýÚΪWebÓ¦ÓóÌÐòÌí¼ÓÁËÒ»¸öHTTP handler£ºScriptHandlerFactory£¬ËüµÄ×÷ÓÃÊÇ´¦Àí½Å±¾µ÷ÓÃWeb
ServiceµÄÇëÇó£¬Èç¹ûÊǷǽŲ½¶Ô.asmxµÄµ÷ÓÃÇëÇó£¬Ôòת¸øĬÈϵĴ¦ÀíÆ÷¡£
ʹÓýű¾µ÷Ó÷þÎñÆ÷·½·¨ÓÐÁ½ÖÖ·½Ê½£¬Ò»ÖÖÊǵ÷Óó£¹æµÄASP.NET Web
Service£¬ÁíÒ»ÖÖÖ±½Óµ÷ÓÃÒ³Ãæ´úÂëÒ³Éϵķ½·¨¡£Á½ÖÖ·½Ê½¶¼· ......
×î½ü·ÃÎÊÁ˽¨ÐÐÍøվʱ https://ibsbjstar.ccb.com.cn/V5/index.html#£¬£¨ÆäʵÔÚoblog,http://www.oblog.cnÒ²²ÉÓÃÁËÀàËƵļ¼ÇÉ£¬²»¹ý·½·¨²»Í¬°ÕÁË£©
¡¡¡¡¿ÉÒÔ·¢ÏÖ£¬µ±Ñ¡Ôñ²»Í¬µÄÎı¾¿ò£¬¿ÉÒÔ³öÏÖ²»Í¬µÄÑÕÉ«£¬ÒªÍê³ÉÕâ¸ö¹¦Äܼܺòµ¥£¬µ«ÊÇÈç¹ûÓкܶàÀàËƵŦÄÜ£¬Èç¹ûÒ»¸ö¸öÉèÖÿؼþÑùʽÏÔÈ»ºÜÀÛ£¬Ò»¸ö¼òµ¥µÄ´¦Àí·½·¨Ð´Ò»¸ö·½·¨ÈÃϵͳִÐоͿÉÒÔÁË£¬¿´ÈçÏ´úÂ룺
class BasePage:Page
{
public static void SetInputControlsHighlight(Control container, string className, bool onlyTextBoxes)
{
foreach (Control ctl in container.Controls)
{
if ((onlyTextBoxes && ctl is TextBox) ¡¡¡¡ ctl is TextBox ¡¡¡¡ ctl is DropDownList ¡¡¡¡
ctl is ListBox ¡¡¡¡ ctl is CheckBox ¡¡¡¡ ctl is RadioButton ¡¡¡¡
ctl is RadioButtonList ¡¡¡¡ ctl is CheckBoxList)
{
WebControl wctl = ctl as WebControl;
wctl.Attributes.Add("onfocus", string.Format("this.className = '{0}';", className));
wctl.Attributes.Add("onblur", "this.className = '';");
}
else
{
if (ctl.Controls.Count > 0)
SetInputControlsHighlight(ctl, className, onlyT ......
Ö§¸¶±¦µÄ½Ó¿Úµ÷Óúܲ»·½±ã£¬¸Õ×öºÃÒ»¸ö·â×°£¬ÊµÏÖÁËÐéÄâ½»Ò׺ÍʵÎï½»Òס£
½â¾ö·½°¸ÖÐÓÐÈý¸öÏîÄ¿ÒÔ¼°NDocÉú³ÉµÄÎĵµ£¬¼òµ¥µÄÐòÁÐͼ£ºCommonAliPay£¬·â×°µÄÖ§¸¶±¦½Ó¿Ú¡£
TestAli,asp.netµÄ²âÊÔÏîÄ¿
TestCommonAliPay£¬NunitµÄ²âÊÔÏîÄ¿¡£
µ÷Ó÷½·¨£º
1¡¢ÒýÈëCommonAliPay.dll
2¡¢ÊµÏÖÖ§¸¶±¦·þÎñ½Ó¿ÚµÄ·½·¨µ÷Ó÷½Ê½£º
AliPay ap = new AliPay();
string key = "";//Ìîд×Ô¼ºµÄkey
string partner = "";//Ìîд×Ô¼ºµÄPartner
StandardGoods bp = new StandardGoods("trade_create_by_buyer", partner, key, "MD5", "¿¨2", Guid.NewGuid().ToString(), 2.551m, 1, "hao_ding2000@yahoo.com.cn", "hao_ding2000@yahoo.com.cn"
, "EMS", 25.00m, "BUYER_PAY","1");
bp.Notify_Url = "http://203.86.79.185/ali/notify.aspx";
ap.CreateStandardTrade("https://www.alipay.com/cooperate/gatewa ......
ÔÎÄ£ºÁõÎä|asp.netÖÐcookieµÄ´¦Àí
ʹÓÃÖз¢ÏÖÓÃRequest.Cookies.Remove()ÎÞ·¨É¾³ýcookie,googleÁËһϷ¢ÏÖÒ»°ãÊÇͨ¹ý½«¹ýÆÚʱ¼äÉèÖóɹýÈ¥µÄʱ¼äÀ´Íê³Éɾ³ýµÄ¡£Ë³±ãÕûÀíÏÂcookieµÄ²Ù×÷£º
Ò» ´´½¨
1 µ¥ÖµµÄ´´½¨
C#-Code:
HttpCookie hc = new HttpCookie("Value");
hc.Value = "value";
Response.AppendCookie(hc);
2 ¶àÖµµÄ´´½¨
C#-Code:
HttpCookie hc = new HttpCookie("Value");
hc["Value1"] = "value1";
hc["Value2"] = "value2;
Response.AppendCookie(hc);
¶þ ¶ÁÈ¡
1 µ¥ÖµµÄ¶ÁÈ¡
C#-Code:
string value = Request.Cookies["Value"].Value;
2 ¶àÖµµÄ¶ÁÈ¡
C#-Code:
string value1 = Request.Cookies["Value"]["Value1"].ToString();
string value2 = Request.Cookies["Value"]["Value2"].ToString();
Èý ɾ³ý
C#-Code:
HttpCookie hc = Request.Cookies["Value"];
hc.Expires = DateTime.Now.AddDays(-1);
//ÏÂÃæÕâ¾äÒ»¶¨Òª¼ÓÉÏ£¬·ñÔòÎÞ·¨É¾³ý
Response.AppendCookie(hc);
......
¹Ø¼üÔÚÉÏ´«µÄʹÓÃÓõ½ÁËupload.aspx,¶øÕâ¸öÒ³ÃæĬÈϵıàÂëͳһΪutf-8,ËùÒÔÎÒÃÇÒª¸øËü¸Ä±äһϡ£ÔÚÄãµÄweb.configÖÐÔö¼Ó´Ë×Ö¶Î
<location path="fckeditor/editor/filemanager/connectors/aspx/upload.aspx">
<system.web>
<globalization requestEncoding="utf-8" responseEncoding="gb2312"/>
</system.web>
</location>
×¢Ò⣬ÄãµÄweb.ConfigÖв»ÒªÖ¸¶¨È«¾Ö <globlization>È磺
<globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" uiCulture="zh-CN"/>
Èç¹ûÕâÑù£¬ÄãÖ¸¶¨µÄÆäËû·¾¶<location>½«Ê§Ð§£¬Çмɣ¡£¡£¡£¡ ......