数据绑定

来源:互联网 发布:bug的网络用语 编辑:程序博客网 时间:2024/04/28 20:59

数据绑定通常是用在给控件的属性动态赋值时,非常有用,<%#eval("bind_flied")%> ,asp.net 把它当成一个字符串来处理的。

通常在rowdatabind里面用的比较多。 

eg:  dim link_edit as linkbutton

 

if e.row.rowtype=datacontrolrowtype.datarow then

link_edit=ctype(e.row.findcontrol("linkbutton").linkbutton)   

link_edit.attributes("onclick")="javascript:window.open('edit_employee.aspx?id=<%eval("employee_id")%>')"

    end if

 
原创粉丝点击