让我头痛的GridView Template DropdownList ObjectDataSource...强汗无法传参数
我想把GridView 里的 DropdownList 选择的值,做为参数,传给UPdate操作方法,可是每次更改都传不过去.请高人指..
<form id= "form1 " runat= "server ">
<div>
<asp:ObjectDataSource ID= "ObjectDataSource1 " runat= "server " TypeName= "ProductDB " SelectMethod= "GetProduct " UpdateMethod= "UpdateProduct " DeleteMethod= "DeleteProduct " ConflictDetection= "CompareAllValues " OldValuesParameterFormatString= "old_{0} " OnDeleted= "ObjectDataSource1_Deleted " OnUpdated= "ObjectDataSource1_Updated ">
<UpdateParameters>
<asp:Parameter Name= "ProductName " Type= "String " />
<asp:Parameter Name= "InPrice " Type= "String " />
<asp:Parameter Name= "ProductCount " Type= "String " />
<asp:ControlParameter Name= "ProductTypeID " Type= "Int32 " ControlID= "GridView1.ProductTypeIDtt " PropertyName= "SelectedValue " />
<asp:Parameter Name= "old_ProductID " Type= "Int32 " />
<asp:Parameter Name= "old_ProductName " Type= "String " />
<asp:Parameter Name= "old_InPrice " Type= "String " />
<asp:Parameter Name= "old_ProductCount " Type= "String " />
<asp:ControlParameter Name= "old_ProductTypeID " Type= "Int32 " ControlID= "GridView1.ProductTypeIDtt " PropertyName= "SelectedValue " />
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Name= "old_ProductID " Type= "Int32 " />
<asp:Parameter Name= "old_ProductName " Type= "String " />