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

asp.net Gridview TextBox »Ø³µµÄÎÊÌâÔõô½â¾ö?

Ê×ÏȽ¨Á¢¿Ø¼þGridView1£¬×¢ÒâàÞ
Ò³ÃæEnableEventValidation="false"±ØÐëµÄ¡£
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" AutoGenerateColumns="false" runat="server">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Panel ID="Panel1" DefaultButton="Button1" runat="server">
<asp:TextBox ID="TextBox1" Text='<%#Eval("StrValue")%>' runat="server" />
<asp:Button ID="Button1" UseSubmitBehavior="false" runat="server" Text="Button" OnClick="Button1_Click" />
</asp:Panel>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<br />
<br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>
</form>
ÎÒΪÁËʹÎÒµÄGridViewÓÐÊý¾Ý²âÊÔ£¬ËùÒÔÐÂÔöÁËtestÀ࣬¥Ö÷ÍêÈ«ÓÃÊý¾Ý¿âÀ´ÌṩÊý¾Ý¡£
public class test
{
private string strValue;
public string StrValue
{
get
{
return strValue;
}
set
{
if (strValue == value)
return;
strValue = value;
}
}
}
½Ó×ÅÊÇÒ³Ãæcode²¿·ÖÁË
protected void Page_Load(object sender, EventArgs e)
{
List<test> a = new List<test>();
for (int i = 0; i < 10; i++)
{
test t = new test();
t.StrValue = i.ToString();
a.Add(t);
}
GridView1.DataSource = a;
GridView1.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
Panel pan = (Panel)btn.Parent;
TextBox tb = (TextBox)pan.FindControl("TextBox1");
Label1.Text = tb.Text;
}
¸Ï¿ìÔËÐÐÏ°ɣ¬°ÑÊó±êµã½øµÚÒ»ÐеÄÎı¾¿ò£¬²»ÒªÓÌÔ¥£¬°´»Ø³µ°Ë£¬°´ºÃÁËô£¬¿ì¿´¿´Ï±ߵÄLabelÏÔʾʲô°É£¬Ã»´í°É£¬¶øÇÒÿÐж¼ÓÐÕâÑùµÄЧ¹ûàÞ£¡£¡
ºÃÁËÎÒ×ܽáһϼ¼ÊõÒªµã°É£º
1.ÔÚTemplateÁÐÖÐÓÃPanel°ÑTextBoxºÍButton°ü¹ü½øÈ¥£¬È»ºóÔÚPanelÉÏÉèÖÃDefaultButtonµÄÊôÐÔÖ¸ÏòButton£¬Õâ¸öÊǹؼü¡£
2.ºǫ́Button_ClickʼþµÄsender²ÎÊý¿ÉÒÔ°ïÖúÄã»ñÈ¡ÄãÏëÒªµÄ¿Ø¼þ»ò×ÊÁÏ¡£
thats all


Ïà¹ØÎĵµ£º

ASP.NETÖУ¬¼¸¶Î²¥·ÅÆ÷µÄ´úÂë

µÚÒ»ÖÖ²¥·ÅÆ÷´úÂ룺
<object title="dvubb" align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="object" id="MediaPlayer" width="480" height="360">
<param name="AUTOSTART" value="true"/>
<param name="ShowStatusBar" value="-1"/>
<param name="Filename" va ......

΢ÈíÆóÒµ¿â5.0ѧϰ±Ê¼Ç£¨10£©ASP.NETÄ£¿éÒÀÀµ×¢Èë

    Äú¿ÉÒÔʹÓÃHTTPÄ£¿é£¬Ò»¸öµ½ASP.NET HttpApplicationStateÀàµÄÀ©Õ¹£¬ÔÚGlobal.asax±àд´úÂëÇ¿ÖÆASP.NETÔÚÿһ¸öÒ³ÃæÇëÇóʱ×Ô¶¯×¢ÈëÒÀÀµµÄ¶ÔÏ󣬾ÍÏñÔÚASP.NET Web´°ÌåÓ¦ÓóÌÐòÖÐÌÖÂÛµÄÒ»Ñù.
    ÏÂÁз½·¨ÏÔʾÁËÒ»¸öºÏÊʵķ½·¨Äܹ»»ñÈ¡PreRequestHandlerExecuteʼþ½«Ëü×Ô¼º×¢Èëµ½ASP.NE ......

ËÀÔÚasp.netÒ³ÃæÉúÃüÖÜÆÚ...

ÒýÓÃ×Ô£ºhttp://www.cnblogs.com/suzongwei/archive/2008/11/10/1330377.html
»òÐí Õâ¸ö¸üÒ׶®Ð© ´úÂë¹ý³Ì
http://blog.csdn.net/swort_177/archive/2007/12/02/1912159.aspx
¶ÔÓÚASP.NET¿ª·¢Õߣ¬Àí½âASP.NETµÄÒ³ÃæÉúÃüÖÜÆÚÊǷdz£ÖØÒªµÄ¡£
Ö÷ÒªÊÇΪÁ˸ãÃ÷°×ÔÚÄÄÀï·ÅÖÃÌض¨µÄ·½·¨ºÍÔÚºÎʱÉèÖø÷ÖÖÒ³ÃæÊôÐÔ¡£
µ«ÊǼÇÒäºÍ ......

asp.netÑéÖ¤ÂëÖÆ×÷ʵÀý´úÂë

Ч¹ûͼ
Default.aspxÒ³ÃæµÄÄÚÈÝ
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Verify._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www. ......

ASP.NETÔÚVS2008ÖÐÈçºÎʵÏÖµ÷ÊÔ£¡~~~

µÚÒ»ÖÖÊÊÓÃÓÚûÓн¨Á¢ÐéÄâ·¾¶µÄÏîÄ¿£¬¶øÇÒÏîÄ¿Ò²²»´óµÄÇé¿öÏ£¬Ö±½Ó´ò¶Ïµã£¬Ö®ºóµã»÷F5ÔËÐС£
µÚ¶þÖÖÊÊÓÃÓÚ½¨Á¢ÐéÄâ·¾¶µÄÏîÄ¿£¬´òºÃ¶Ïµã£¬Ö®ºóÑ¡Ôñµ÷ÊÔ->¸½¼Óµ½½ø³Ì->Ñ¡Ôñaspnet_wp.exe£¬Ö®ºó´ò¿ªä¯ÀÀÆ÷£¬´ò¿ªÒ³Ã棬µ½ÓжϵãµÄµØ·½»á×Ô¶¯¸ú×Ù½øÈ¥£¡~
×¢£ºÓеIJÙ×÷ϵͳ¿ÉÄÜÕÒ²»µ½aspnet_wp.exe ¿ÉÄÜ´æÔÚccc.exeÖ®À ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ