Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASP.NET¶¯Ì¬¼ÓÔØÓû§¿Ø¼þµÄʵÏÖ·½·¨

µÚÒ»²½£ºÀýÈçÓû§¿Ø¼þ·ÅÔÚMyList.Ascx£¬È»ºóÆäControlÖ¸ÁîÊÇ£º
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ViewComment.ascx.cs" Inherits="Control_ViewComment"%>
ÕâʱºòÒѾ­ÓÐÁËInherits£¬×Ô´øÁËClassName¾ÍÊÇÆäÃû³Æ£¬Èç¹ûûÓУ¬Ôò±ØÐë´´½¨ClassNameÊôÐÔ¡£
¼ÙÉèÆäÓй«¹²ÊôÐÔID¡£
µÚ¶þ²½£ºÔÚijһ¸öASPXÎļþÐèÒª¶¯Ì¬¼ÓÔصĻ°Ê×ÏÈʹÓÃ
<%@ Reference Control="MyList.Ascx" %>
<%@ Page Language="C#" CodeFile="GetAscx.aspx.cs" Inherits="AdEntity_GetAscx" %>
ÒýÓã¬ÕâʱºòÔÚ´úÂëÒ³GetAscx.aspx.cs¿ÉÒÔ¶¯Ì¬¼ÓÔØASCX¿Ø¼þÁË£º
Control_ViewComment ctrl = (Control_ViewComment)Page.LoadControl("~/Control/ViewComment.ascx");
ctrl.ID = Request["AdentityId"];
base.Controls.Add(ctrl);
Áí£º
<%@ Register Assembly="Business" Namespace="Business" TagPrefix="My" %>
Íê³É¡£


Ïà¹ØÎĵµ£º

ASP.NET³£Óü¼ÇÉ

1.´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="++"')</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attributes.Add("onclick","return ......

Asp.Net ButtonµÄUseSubmitBehaviorÊôÐÔ

ÔÚijҳÃæÉÏÓÐÈçÏÂÐÅÏ¢£¬
Html£¬
<asp:Button ID="btn" runat="server" Text="Click me" OnClick="ButtonClicked" />
<script language="javascript">
function javascriptMethod() {
alert(1);
}

</script>
C#£¬
protected void ButtonClic ......

ÓÃasp.net»¹Ô­Óë»Ö¸´sqlserverÊý¾Ý¿â

  
ÉÏ´Î×öÁ˸öÏîÄ¿£¬Éæ¼°µ½Êý¾Ý¿âµÄ»¹Ô­ºÍ»Ö¸´£¬µ½ÍøÉÏÕÒÁËһϣ¬ÊÇÀûÓÃSQLDMOʵÏֵģ¬Ö»ÒªÌí¼ÓSQLDMOÒýÓþͺÃÁË£¬È»ºóÀûÓÃϱߵÄÀàµÄ·½·¨¾Í¿ÉÒÔʵÏÖÁË¡£
ÎÒ°ÑÔ­×÷ÕßµÄÀàÀ©³äÁËһϣ¬¿ÉÒÔ×Ô¶¯Ê¶±ðweb.configÀï µÄÊý¾Ý¿âÁ¬½Ó×Ö·û´®£¬¿ÉÒÔͨ¹ý±äÁ¿ÉèÖû¹Ô­»Ö¸´µÄÐÅÏ¢¡£
ÐèҪעÒâµÄʱ»¹Ô­£¬»¹Ô­µÄʱºòÎÊÌ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ