I’m trying to pass a Session(“sessionVar”) on to ListView INSERT. Is there any way I can achieve this. I tried this and dosns’t seem to work:
InsertCommand="INSERT INTO [EmployeeTest] ([FName], [LName], [samAccount]) VALUES (@Fname, @LName,@samAccount)
<InsertParameters>
<asp:Parameter Name="FName" Type="String" />
<asp:Parameter Name="LName" Type="String" />
<asp:SessionParameter Name="EmployeeID" SessionField="samAccount"
Type="String" />
</InsertParameters>
On Page_Load:
Session["samAccount"]=getSamAccountFromActiveDirectory(UserName);
Am I missing anything? or Is it not possible to pass Session variable with in ListView.
Thank you.
Shouldn’t you have EmployeeID as the db field name, not samAccount?