how can i pass a dynamic (vdUser) value to either UpdateCommand or UpdateParameters
in webform.aspx has
<body>
<% String vdUser = Request.ServerVariables["AUTH_USER"]; %>
...
<asp:SqlDataSource ID="dg_vendorTrk" runat="server"
ConnectionString="<%$ ConnectionStrings:conn_vendor_server %>"
...
UpdateCommand="UPDATE table1 SET vdLogAs=@vdUser WHERE (vdId=@vdId)" >
<UpdateParameters>
<asp:QueryStringParameter Name="vdUser" DefaultValue="<%= Request.ServerVariables["AUTH_USER"] %>" />
</UpdateParameters>
</asp:SqlDataSource>
...
<asp:GridView
ID="GridView2" runat="server" AllowPaging="True"
â¦
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:CommandField ShowEditButton="True" ShowSelectButton="True" />
<asp:BoundField DataField="vdId" HeaderText="vdId" InsertVisible="False" ReadOnly="True" SortExpression="vdId" />
<asp:BoundField DataField="vdLogAs" HeaderText="LogAs" ReadOnly="true" SortExpression="vdLogAs" />
â¦
</asp: GridView>
Please HELP, how can i pass a vdUser to either UpdateCommand or UpdateParameters
|