Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ObjectDataSource Parameters Name
Message
 
 
To
26/06/2008 09:00:18
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
01326895
Message ID:
01326902
Views:
19
The question is unclear, but just a suggestion - use PRE tags to show the actual code, see how I changed your message.

>How can i calling UpdateMethod, where UpdateParameter Name different from the UpdateMethod?
>
>
>
>for eg.
>
>p/s i replace the <> with {} cause UT not allow me post >
>
>I have a DetailsView
>
>  {asp:DetailsView ID="DetailsView2" runat="server" AutoGenerateRows="False" DataSourceID="ObjectDataSource2"
>        Height="50px" Width="125px" AllowPaging="True" DataKeyNames="id"}
>        {Fields}
>            {asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id"]
>
>
>            {asp:BoundField DataField="pplId" HeaderText="pplId" SortExpression="pplId" /}  { % {------------------------------ using pplId % }
>
>
>            {asp:CommandField ShowEditButton="True" /}
>        {/Fields}
>{/asp:DetailsView}
>
>
>
>and ObjectDataSource :
>
>{asp:ObjectDataSource ID="ObjectDataSource2" runat="server" InsertMethod="AddBrdCusOr"  SelectMethod="GetBrdCusOr1" TypeName="mySqlBrdBLL" UpdateMethod="UpdateBrdCusOr" }
>        {UpdateParameters}
>
>
>            {asp:Parameter Name="pplId" Direction="Output"  Type="Int32" /}  { % {------------------------------ using pplId % }
>
>
>            {asp:Parameter Name="id" Type="Int32" /}
>        {/UpdateParameters}
>
>
>
>UpdateMethod:
>
>[System.ComponentModel.DataObjectMethodAttribute
>(System.ComponentModel.DataObjectMethodType.Update, true)]
>
>
>    public bool UpdateBrdCusOr(Int32 iCusId, Int32 id)   //{-------------------------- iCusId instead of pplId
>
>
>    {
>        mySqlBrd.brdcusorDataTable dtbrdCusOrs = Adapter.GetBrdCusOrById(id);
>        if (dtbrdCusOrs.Count == 0)
>            return false;
>
>        mySqlBrd.brdcusorRow rBrdCusOr = dtbrdCusOrs[0];
>
>
>        rBrdCusOr.iCusId = iCusId;
>
>        int rowsAffected = Adapter.Update(rBrdCusOr);
>
>        return rowsAffected == 1;
>    }
>
>
>
>
>
>
>
>Any suggestions would be appreciated.
>
>TIA.
>
>Best Regards,
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform