日期:2014-05-18  浏览次数:20462 次

ObjectDataSource控件的SelectParameters如何绑定到相应CodeFile的属性上去
请问,ObjectDataSource控件的SelectParameters如何绑定到相应CodeFile的属性上去

------解决方案--------------------
比如在FormView里有这样一个控件
<asp:TextBox ID= "txtitem_code " runat= "server " Text= ' <%# Bind( "id ") %> ' MaxLength= "3 "> </asp:TextBox>

那么早ObjectDataSource中
<asp:ObjectDataSource ID= "arcitemFv_ODS " runat= "server " TypeName= "UniOA.s_archives_item "
SelectMethod= "SelectData " InsertMethod= "InsertData " UpdateMethod= "UpdateData "
DeleteMethod= "DeleteData ">
<SelectParameters>
<asp:Parameter Name= "id " Type= "int32 " DefaultValue= " " />
</SelectParameters>
</asp:ObjectDataSource>