ASP.NET Á¬½ÓÊý¾Ý¿â
Õâ¸ö¶«Î÷Ì«¾À½áÁË~Ìù³öÀ´´úÂ룬¹©´ó¼ÒÏíÓÃ
·ÖÈý¸ö²¿·Ö£º.config .aspx .aspx.cs
//web.config
<appSettings>
<add key="keystring" value="Data Source=ZRQ-PC;Initial Catalog=OnlineJudge;Integrated Security=True"/>
</appSettings>
//page.aspx
<form id="form2" name="form2" method="post" action="">
<asp:Panel ID="unlogin" runat="server">
<div class="Login" align="center">
<p>Login</p>
Óû§Ãû<asp:TextBox ID="username" runat="server" Width="106px"></asp:TextBox><br />
ÃÜÂë <asp:TextBox ID="password" runat="server" Height="22px" Width="106px"></asp:TextBox><br />
<asp:Button ID="submit" runat="server" Text="怬" onclick="submit_Click" />
<asp:Button ID="register" runat="server" Text="×¢²á" />
</div>
</asp:Panel>
<asp:Panel ID="allogin" runat="server" Visible="false">
<div class="Login" align="center">
<asp:Label ID="welcome" runat="server" Text="Label"></asp:Label><br />
<asp:Button ID="alterinfo" runat="server" Text="ÐÞ¸ÄÐÅÏ¢" /><br />
<asp:Button ID="logout" runat="server" Text="×¢ÏúµÇ½" /><br />
<asp:Button ID="register1" runat="server" Text="×¢²áÐÂÓû§" /><br />
<asp:Button ID="relogin" runat="server" Text="ÖØÐÂÊäÈëÃÜÂë" />
</div>
</asp:Panel>
</form>
//page.a
Ïà¹ØÎĵµ£º
The MVC bits have finally arrived and I’ve spent a while digesting them. I’ve been waiting for the bits to be released to begin working on a side-project, so the first thing I did after downloading them last night was crank it up and start working on a new ASP.NET MVC Web Application p ......
(Ò»).Web.ConfigÊÇÒÔXMLÎļþ¹æ·¶´æ´¢,ÅäÖÃÎļþ·ÖΪÒÔϸñʽ
1.ÅäÖýڴ¦Àí³ÌÐòÉùÃ÷
ÌØµã£º λÓÚÅäÖÃÎļþµÄ¶¥²¿£¬°üº¬ÔÚ<configSections>±êÖ¾ÖС£
2.ÌØ¶¨Ó¦ÓóÌÐòÅäÖÃ
ÌØµã: λÓÚ<appSetting>ÖС£ ¿ÉÒÔ¶¨ÒåÓ¦ÓóÌÐòµÄÈ«¾Ö³£Á¿ÉèÖõÈÐÅÏ¢.
3.ÅäÖýÚÉèÖÃ
ÌØµã: λÓÚ<system.Web>½ÚÖУ¬¿ØÖÆAsp.netÔËÐÐÊ ......
Ö»ÓÐÔÚ¡òPageÖ¸ÁîÖÐÉèÖÃÁË£ºAutoEventWireup="true"£¬·þÎñÆ÷¶ËµÄ±àÒëÆ÷½«°´ÕÕ Page_eventname ·½·¨ÃûµÄÐÎʽ×Ô¶¯µÄ¼ì²éÏàӦʼþ´¦Àí·½·¨£¬×Ô¶¯ÊµÏÖʼþµÄ¶©ÔÄ¡£
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System ......
Asp.net MVCÖеÄDropDownListsÃ²ËÆ»áÈÃÒ»¿ªÊ¼´ÓAsp.net Formsת¹ýÀ´µÄ³ÌÐòÔ±Ôì³É²»ÉÙÃÔ»ó.ÕâÆªÎÄÕ½²ÊöÁËΪÁËʹÓÃDropDownLists,ÄãÐèÒªÔÚAsp.Net MVCÖÐÖªµÀµÄ·½·½ÃæÃæ.
DropDownList,ComboBox,ÎÞÂÛÄãϲ»¶Ôõô³ÆºôÕâЩ£¬ËûÃǺÁÎÞÀýÍâµÄ»á±»Éú³ÉΪhtml select±êÇ©. ÔÚ<select>¿ª±êÇ©ºÍ</ ......
asp.net(c#)ÍøÒ³Ìø×ªÆßÖÖ·½·¨Ð¡½á
·¢²¼Ê±¼ä£º2009-11-25 11:13:03
¡¡¡¡1.Response.Redirect("http://www.yayiba.com",false);
¡¡¡¡Ä¿±êÒ³ÃæºÍÔÒ³Ãæ¿ÉÒÔÔÚ2¸ö·þÎñÆ÷ÉÏ£¬¿ÉÊäÈëÍøÖ·»òÏà¶Ô·¾¶¡£ºóÃæµÄboolֵΪÊÇ·ñÍ£Ö¹Ö´Ðе±Ç°Ò³¡£
Ìø×ªÏòеÄÒ³Ãæ£¬Ô´°¿Ú±»´úÌæ¡£"
ä¯ÀÀÆ÷ÖеÄURLΪз¾¶¡£
:Response.Redirect·½ ......