Your use of the rendering expression syntax to dynamically supply the
value of the "PaidTime" parameter is flawed both syntactically and
logically. Syntactically because of the missing equals symbol and
logically because your code supplies the value when the page is about
to be rendered whereas the useful events of the SqlDataSource and the
GridView have all occurred by then.

The correct way to modify the value would be in the SqlDataSource
Updating event rather than declaratively. For an example, see my
suggestions in this earlier thread :

http://groups.google.com/group/DotNetDevelopment/browse_thread/thread/43242c2c15349f0b

On Dec 27, 12:00 pm, "m...@ni" <[email protected]> wrote:
>  <asp:SqlDataSource ID="DSViewOvrAllUnPaidBills" runat="server"
>         ConnectionString="<%$ ConnectionStrings:CHSConnectionString
> %>"
>         SelectCommand="UDSP_ViewOvrAllUnPaidBills"
> SelectCommandType="StoredProcedure"
>         UpdateCommand="UDSP_UpdateBill"
> UpdateCommandType="StoredProcedure" >
>         <UpdateParameters>
>             <asp:Parameter Name="BillId" Type="Int64" />
>             <asp:Parameter Name="ChequeNo" Type="String"
> ConvertEmptyStringToNull="true" />
>
> ---------------------------------------------------------------------------­--------------------------------------------
>     <asp:Parameter Name="PaidTime" Type="DateTime" DefaultValue='<%
> DateTime.Now%>'/>
>
> ---------------------------------------------------------------------------­--------------------------------------------
>         </UpdateParameters>
>     </asp:SqlDataSource>
>
>  i actually want to input the datetime as a default value to in update
> parameter,if the user dont insert the date.but m unable to do in ths
> maner.i realy need on urgent basis,thanks for showing ur concern.

Reply via email to