ASP.NETÖеÄͼƬÉÏ´«
protected void Button3_Click(object sender, EventArgs e)
{
//¶¨Òå±äÁ¿,ÅжÏÊÇ·ñÓÐͼƬÉÏ´«
bool fileIsValid = false;
//Èç¹ûÓÐͼƬÉÏ´«,ÅжÏÆä¸ñʽ
if (this.FileUpload1.HasFile)
{
int len = this.FileUpload1.PostedFile.ContentLength;
if (len / 1024 > 60)
{
this.Label1.Text = "ͼƬ̫´óÁË";
return;
}
else
{
string type = this.FileUpload1.PostedFile.ContentType;
if (type == "image/pjpeg")
{
fileIsValid = true;
}
else
{
&nbs
Ïà¹ØÎĵµ£º
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace zhixiaojia.Webctr.WebControls
{
[DefaultProperty("Text")]
[ToolboxData("&l ......
Ç°¶Îʱ¼äÒòΪһÌض¨ÐèÇóдÁËÏÂÃæ´úÂë¡£ÐèÇóÈçÏ£ºÔÚÓû§·ÃÎʱ¾Õ¾ËùÓÐaspxÒ³Ãæʱ£¬Ê×ÏÈÅжÏÓû§Session["login"]ÊÇ·ñ´æÔÚ£¬Èç¹û²»´æÔÚ£¬ËµÃ÷¸ÃÓû§Î´µÇ½£¬ÒªÈøÃÓû§Ìøתµ½Ö¸¶¨µÄÒ³Ãæ¡£ËùÒÔÏëдһ¸öSessionµÄ¹ýÂËÆ÷£¬Ë¼Ç°ÏëºóÓ¦¸Ãдһ¸ö¼Ì³ÐIHttpModuleµÄ´¦ÀíÀà¡£ÊÔÑéÁ˼¸ÖÖ·½Ê½·¢ÏÖÖ»Óн«·½·¨¼ÓÔÚ.AcquireRequestStateÖвŠ......
private
static
CacheItemRemovedCallback OnCacheRemove
=
null
;
protected
void
Application_Start(
object
sender, EventArgs e)
{
AddTask(
"
DoStuff
"
,
60
);
}
private
vo ......
ASP.NETÖеÄEval£¨£©ºÍDataBinder.Eval£¨£©·½·¨
2009-12-12 17:55
Eval( " ")ºÍBind( " ")¡¡ÕâÁ½ÖÖÒ»¸öµ¥Ïò°ó¶¨£¬Ò»¸öË«Ïò°ó¶¨
bindÊÇË«Ïò°ó¶¨,µ«ÐèÊý¾ÝÔ´¿É¸ü¸Ä²ÅÄÜÓÃ
ASP.NET 2.0¸ÄÉÆÁËÄ£°åÖеÄÊý¾Ý°ó¶¨²Ù×÷£¬°Ñv1.xÖеÄÊý¾Ý°ó¶¨Óï·¨DataBinder.Eval(Container.DataItem, fieldname)¼ò»¯ÎªEval(fieldname)¡£Eval·½· ......