Reputation: 451
I have following code
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
UpdateCommand="UPDATE [gMeter] SET ... [userId] = @userId ...
I need to parametr @userId assign session variable Session["userId"]
, any ideas? I tried
[userId] = <%= Session["userId"]%>
But it does not works.
Upvotes: 0
Views: 1011
Reputation: 57976
Try this inside your asp:SqlDataSource
<asp:SessionParameter Name="userId" SessionField="userId" Type="Int32" />
Upvotes: 5