在页脚的按钮属性中加上这个属性CommandName='AddNewType(可任意输)'
然后在 _ItemCommand 事件中添加
if(e.CommandName=='AddNewType')
{
//..........
}
人活着就是要实现自我,只有拥有自我的人才能称为一个完整的人.貌似很有道理的一句话.但,到底什么是'自我'呢?是否可以简单的理解为对自身的认识呢?如何认识自身呢?有禅曰:自我是通过比较来实现的;
和桌子比较,我有4条腿他也有4条腿,他的4条腿是木头,不能走,而我能;它的脑袋上可以放电脑,而我不能;和树比较,我有2只手,它有数不清的手.但我却没有他高;
大概这就是认识自我的过程了吧.
在每天不断的认识,不断的比较中,怎样能不迷失自我呢?是不是我的脑袋不能放电脑我就要去把脑袋磨平呢?是不是我没有树高,要把自己拉长呢?
'是'积极的去追求,'不'平静的享受生活;
'是'不停的去攀比,'不'消极的怨天尤人;
妒忌将是你认识自我中最大的障碍,是一块必须根除的毒瘤;
请相信自己的独一无二,坚信造物的完美,'我'是无法被取代的.
--堕落从你带上假项链那一刻开始.哼.
class Account
{
....
public uint totalAccounts;
....
}
class Bank
{
Account myAccount = new Account();
....myAccount.totalAccounts....
}
-------------------------------------------------------
class Account
{
....
public static unit totalAccounts;
....
}
class Bank
{
Account myAccount = new Account();
....myAccount.totalAccounts....//无效
....Account.totalAccounts......
}
<script
language='javascript'>
function document.onkeydown()
{
var e = event.srcElement;
if (event.keyCode == 13 && (e.tagName !=
'INPUT' || (e.type !='button' && e.type != 'submit'
&& e.type !='reset')))
{
document.Form1.Add_btn.click();
}
}
</script>
private void SetFocus(Control
controlToFocus)
{
StringBuilder scriptFunction=new
StringBuilder();
String scriptClientId;
scriptClientId = controlToFocus.ClientID;
scriptFunction.Append('<script
language='javascript'>');
scriptFunction.Append('document.getElementByIdx(''+scriptClientId+'').focus();document.getElementByIdx(''+scriptClientId+'').select();');
scriptFunction.Append('</script>');
RegisterStartupScript('focus',scriptFunction.ToString());
}
using System.Web.Mail;
/// <summary>
/// 发送邮件
/// </summary>
/// <param name='DT'>邮件地址集合</param>
/// <param
name='subject'>邮件标题</param>
/// <param name='body'>邮件正文</param>
private void SendEmail( DataTable DT,string
sSubject,string sBody)
{
MailMessage email= new MailMessage();
for( int i=0; i < DT.Rows.Count; i++ )
{
email.To +=
DT.Rows[i][0].ToString()+';';
}
email.From='xxx@xxx.xxx';
email.Subject=sSubject;
email.Body=sBody;
&
private void
dg_topic_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType==ListItemType.Item)
{
string topicid =
dg_topic.DataKeys[(int)e.Item.ItemIndex].ToString();
e.Item.Attributes.Add('onmouseover','this.style.backgroundColor='#99cc00';this.style.color='buttontext';this.style.cursor='hand';');
e.Item.Attributes.Add('onmouseout','this.style.backgroundColor='';this.style.color='';this.style.cursor='defualt'');
e.item.Attributes.Add('ondblclick',
'location.href='ShippedGrid.aspx?id='+topicid+''');
}
}
private void
dg_topic_PageIndexChanged(object source,
System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
dg_topic.CurrentPageIndex=e.NewPageIndex;
BindTopic();//绑定数据
}
DataTable dt = new DataTable();
dt = sourceDt.Copy();
DataRow[] drs = dt.Select(condition);
dt = new DataTable();
dt = sourceDt.Clone();
for(int i = 0; i< drs.Length ;i++)
{
dt.Item.Add(drs[i].ItemArray);
}
DataView view = new DataView();
view = dt.DefaultView;
view.Sort(SortExpress);
在网上没找到写在后台的代码,自己帖一个,方便看
private void SetText(Control
controlToSet,string text)
{
StringBuilder scriptFunction=new
StringBuilder();
String scriptClientId;
scriptClientId = controlToSet.ClientID;
scriptFunction.Append('<script
language='javascript'>');
scriptFunction.Append('obj =
document.getElementByIdx(''+scriptClientId+'');obj.innerHTML +=
''+text+''');
scriptFunction.Append('</script>');
RegisterStartupScript('setText',scriptFunction.ToString());
}