Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : asp.net

ASP.NET ÊÓͼ״̬

 Web ÊÇ»ùÓÚÎÞ״̬µÄhttpЭÒ飬ASP.NET ΪÁ˱£Ö¤¿Ø¼þÔÚÒ³Ãæ´«Ë͵½·þÎñÆ÷£¬ÔÙ´Ó·þÎñÆ÷·¢»Øµ½Ò³ÃæµÄʱ±£³Ö֮ǰµÄ״̬¡£
´úÂë×¼±¸£º
ÔÚaspxÒ³ÃæÉÏÌí¼ÓÒ»¸ölistbox¿Ø¼þ£¬ºÍÒ»¸öbutton·þÎñÆ÷¿Ø¼þ£º
<
asp:ListBox runat
=
"
server
"
 ID
=
"
lbViewState
"
></
asp:ListBox
>
  
<
asp:Button runat
=
"
server
"
 ID
=
"
Button1
"
 Text
=
"
Submit
"
/>
  
ÔÚºǫ́csÎļþÉϼÓÉÏ´úÂëÈçÏ£º
protected
 
void
 Page_Load(
object
 sender, EventArgs e)   
 {   
    
if
 (
!
Page.IspostBack)   
    {   
        
this
.lbViewState.Items.Add(
new
 ListItem(
"
1
"
));   
        
this
.lbViewState.Items.Add(
new ......

dzÎöasp.netÉú³ÉËæ»úÃÜÂë

ÔÚ¿ª·¢ÐèÒªÓû§×¢²áºó²ÅÄÜʹÓÃÌṩµÄ¸÷ÏÄܵÄÓ¦ÓóÌÐòʱ£¬ÔÚÐÂÓû§Ìá½»×¢²áÐÅÏ¢ºó£¬½Ï³£¼ûµÄ×ö·¨ÊÇÓɳÌÐòÉú³ÉËæ»úÃÜÂ룬Ȼºó·¢ËÍÃÜÂëµ½Óû§×¢²áʱÌîдµÄµç×ÓÐÅÏ䣬Óû§ÔÙÓÃÊÕµ½µÄÃÜÂëÀ´¼¤»îÆäÕÊ»§¡£
ʵÏÖASP.NETÉú³ÉËæ»úÃÜÂ빦ÄÜÊǺÜÈÝÒ׵ģ¬ÏÂÃæµÄ´úÂë¸ø³öÁËÍêÕûµÄʵÏÖ·½·¨£º
publicstaticstringMakePassword(stringpwdchars,intpwdlen)
{
stringtmpstr="";
intiRandNum;
Randomrnd=newRandom();
for(inti=0; i{
iRandNum=rnd.Next(pwdchars.Length);
tmpstr+=pwdchars[iRandNum];
}
returntmpstr;
}
¶ÔÕÕÔ´Â룬½²Ò»Ï¾ßÌåµÄ˼·£º
·½·¨ MakePassword ½ÓÊÜÁ½¸ö²ÎÊý£¬pwdchars ²ÎÊýÖ¸¶¨Éú³ÉµÄËæ»úÃÜÂë´®¿ÉÒÔʹÓÃÄÄЩ×Ö·û£¬pwdlen Ö¸¶¨Éú³ÉµÄËæ»úÃÜÂë´®µÄ³¤¶È¡£ÓÐÁËÕâÁ½¸ö²ÎÊý£¬Í¨¹ýµ÷Óà Random ÀàµÄ Next() ·½·¨£¬ÏÈ»ñµÃÒ»¸ö´óÓÚ»òµÈÓÚ 0 ¶øСÓÚ pwdchars ³¤¶ÈµÄÕûÊý£¬ÒÔ¸ÃÊý×÷ΪË÷ÒýÖµ£¬´Ó¿ÉÓÃ×Ö·û´®ÖÐËæ»úÈ¡×Ö·û£¬ÒÔÖ¸¶¨µÄÃÜÂ볤¶ÈΪѭ»·´ÎÊý£¬ÒÀ´ÎÁ¬½ÓÈ¡µÃµÄ×Ö·û£¬×îºó¼´µÃµ½ËùÐèµÄËæ»úÃÜÂë´®ÁË¡£
´úÂëµ÷Óà MakePassword() ·½·¨»ñÈ¡³¤¶ÈΪ 10 £¬¿ÉÓÃ×Ö·û·¶Î§Îª´óСд×Öĸ¼°Êý×ÖµÄËæ»ú×Ö·û´®¡£
string randomchars ="abcdefghijklmnopqrstuvw ......

ASP.NETÉú³É¾²Ì¬Ò³Ãæ·½·¨´óÈ«

·½°¸1£º
/// <summary>
/// ´«ÈëURL·µ»ØÍøÒ³µÄhtml´úÂë
/// </summary>
/// <param name="Url">URL</param>
/// <returns></returns>
public static string getUrltoHtml(string Url)
{
errorMsg = "";
try
{
System.Net.WebRequest wReq = System.Net.WebRequest.Create(Url);
// Get the response instance.
System.Net.WebResponse wResp =wReq.GetResponse();
// Read an HTTP-specific property
//if (wResp.GetType() ==HttpWebResponse)
//{
//DateTime updated =((System.Net.HttpWebResponse)wResp).LastModified;
//}
// Get the response stream.
System.IO.Stream respStream = wResp.GetResponseStream();
// Dim reader As StreamReader = New StreamReader(respStream)
System.IO.StreamReader reader = new System.IO.StreamReader(respStream, System.Text.Encoding.GetEncoding("gb2312"));
return reader.ReadToEnd();
}
catch(System.Exception ex)
{
errorMsg = ex.Message ;
}
return "";
}
Äã¿ÉÒÔÓÃÕâ¸öº¯Êý»ñÈ¡ÍøÒ³µÄ¿Í»§¶ËµÄhtml´úÂ룬Ȼºó±£´æ ......

Apache run asp.net==>2.0ÒÔÉϵİ汾


ÒÔÏÂÄÚÈÝ,´ÔÍøÉÏCOPY¹ýÀ´µÄ...
ApacheÊÇÄ¿Ç°¹ã·ºÊ¹ÓõÄÒ»ÖÖÍøÂç·þÎñÆ÷³ÌÐò£¬²»½öÔÚUNIX/LINUXƽ̨Éϱ»´óÁ¿Ê¹Ó㬶øÇÒÔÚWindowsƽ̨ÉÏÒ²ÓÐÐí¶àÕ¾µã·ÅÆúÁËIIS¶øתÏòApache¡£.NETÊÇ΢ÈíÍƳöµÄ¹¦ÄÜÇ¿´óµÄ¿ª·¢¼¼Êõ£¬ÆäÄ¿±ê¾ÍÊÇÓëJava¿¹ºâ¡£ASP.NET·Ç³£ÊʺÏÓÚÖÐСÆóÒµµÄWebÓ¦Óã¬ÆäÐÔÄܽÏASP3.0ÓÐÁ˼«´óµÄÌá¸ß¡£ÏÂÃæ¾Í½éÉÜÈÃApacheÖ§³ÖASP.NETµÄ°ì·¨¡£
    Ê×ÏÈ£¬±ØÐëÒªÓÐWindows»·¾³ºÍ.NET FrameworkµÄÖ§³Ö¡£´ËÍ⻹½¨Òé°²×°.NET¿ª·¢¹¤¾ßÈç.NET Framework
SDK»òÕßVisualStudio.NET¡£ÐèҪעÒâµÄÊÇWindowsµÄ°æ±¾Ó¦Îª2000¡¢2003ºÍXP¡£Win9XϵÁв»ÄÜ°²×°.NET
Framework¡£È»ºóÐèÒª°²×°Apache¡£Ó¦¸ÃʹÓÃWin32ƽ̨µÄApache£¬°æ±¾2.0ÒÔÉÏ¡£ÏÂÔصØÖ·£ºhttp://labs.renren.com/apache-mirror/httpd/binaries/win32/httpd-2.2.15-win32-x86-no_ssl.msi
ÏÂÔز¢°²×°Apache»·¾³ÏµÄASP.NETÄ£¿é¡£ÏÂÔصØÖ·£ºhttp://downloads.sourceforge.net/project/mod-aspdotnet/mod_aspdotnet/2.x.0.2006/mod_aspdotnet-2.2.0.2006-setup-r2.msi
ÏÂÔØÍê³ÉºóË«»÷´ò¿ª£¬Ò»Â·Next¼´¿É°²×°Íê³É¡£×¢£ºis not a valid path to an installed instance of
apache£¬Óöµ½Õâ¸ö´íÎó£¬ËµÃ÷ÄãµÄ ......

asp.net mvcÇ¿´óµÄ·ÖÒ³¿Ø¼þMvcPager


²»¹ÜʹÓÃʲôÀ´¿ª·¢³ÌÐò£¬¶¼ÉÙ²»ÁËÐèÒª×ö·ÖÒ³£¬Ä¿Ç°Ê¹ÓÃasp.net
mvc¿ª·¢µÄwebÓ¦ÓóÌÐòµÄÈËÔ½À´Ô½¶àÁË£¬ÏàÓ¦µÄ¸¨Öú£¬Ìá¸ß¿ª·¢Ð§ÂʵÄhelper·½·¨¡¢¿Ø¼þ¶¼½«»á³öÏÖ¡£½ñÌìÎÒÏò´ó¼Ò½éÉÜÒ»¿îÔÚasp.net
mvc¿ò¼ÜÖÐʹÓõķÖÒ³¿Ø¼þ¡£±¾ÈËÒ²ÊÇÔÚÐÂÄêµÄʱºò³õ´ÎʹÓ㬵«ÊÇһֱûÓÐÍƼö¸ø´ó¼Ò¡£ÀûÓÃÎåÒ»ÐÝϢʱ¼äÒ²¾Í½éÉܸø´ó¼Ò¡£ÉùÃ÷ÎÒÓ벩Ñî¼ÆËã»úÓÐÏÞ¹«Ë¾ÎÞÈÎ
ºÎ¹ØϵֻÊǾõµÃÕâ¸ö·ÖÒ³¿Ø¼þºÜºÃÓ㬲¢ÇÒ¹¦ÄÜÇ¿´ó£¬ÔÚÕâÀïÊÇÕæµÄֻΪ½éÉÜÕâ¿î·ÖÒ³¿Ø¼þ¡£
ÁíÍâÏÂÔصØÖ·£ºhttp://mvcpager.codeplex.com/releases/view/42912
ÁíÍ⻹ÓÐÏà¹ØʹÓõÄDEMOÒ²ºÜ·á¸»£¬ÉÏÃæµÄÍøÖ·Ò²¿ÉÒÔÏÂÔطdz£ÍêÕûµÄDEMO¡£
DEMOÀïÓÐʹÓø÷ÖÖÔÚasp.net mvcÖÐÌᳫµÄ·½Ê½À´ÊµÏÖ·ÖÒ³¹¦ÄÜ£¬·Ö±ðÓÐ:
1.±ê×¼µÄUrl·ÖÒ³ ÔÚÏßÑÝʾЧ¹ûÇë¿´:http://www.webdiyer.com/Controls/MvcPager/Demo
2.jquery ajax·ÖÒ³ ÔÚÏßÑÝʾЧ¹ûÇë¿´£ºhttp://www.webdiyer.com/Controls/MvcPager/AjaxDemo
3.Microsoft Ajax·ÖÒ³ ÔÚÏßÑÝʾЧ¹ûÇë¿´£ºhttp://www.webdiyer.com/Controls/MvcPager/MicrosoftAjaxDemo
4.ʹÓÃDataRow¼¯ºÏ·ÖÒ³ ÔÚÏßÑÝʾЧ¹ûÇë¿´£ºhttp://www.webdiyer.com/Controls/MvcPager/DataRowsPaging
5.ASP.NET MVC Pager· ......

½â¾ödatalistÖе¥Ñ¡°´Å¥¿ÉÒÔ¶àÑ¡µÄÎÊÌ⣨Asp.Net£©

ÎÊÌâÃèÊö£º
Asp.NetÖÐdatalistµÈweb¿Ø¼þÀïÃ棬·Å¶à¸öµ¥Ñ¡°´Å¥µÄʱºò¿ÉÒÔͬʱ¶àÑ¡¡£
ÎÊÌâ½â¾ö£º
×îÀíÏëµÄ½â¾öÖ®µÀ£¬ÓÃjavascript£º
<script language="javascript" type="text/javascript">
function clickit() {
        var dom=document.all;
        var el=event.srcElement;
        if(el.tagName=="INPUT"&&el.type.toLowerCase()=="radio")
        {
                for(i=0;i<dom.length;i++)
                {
                        if(dom[i].tagName=="INPUT"&&dom[i].type.toLowerCase()=="radio")
            &nb ......
×ܼǼÊý:2672; ×ÜÒ³Êý:446; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [2] [3] [4] [5] 6 [7] [8] [9] [10] [11]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ