How can i get a variable value out my SqlDataSource.
Step by step this is what i am trying to do.
1. I have a SqlDataSouce
2. it has a @Genera variable in it.
3. i would like to store this variable in a different variable named GeneraType.
I am new to asp and have tried a number of thing but with no success. I can figure out the code
This is what i have for code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [SongsCW] WHERE [songID] = @songID" InsertCommand="INSERT INTO [SongsCW] ([uNameID], [createdatetime], [Genera], [sName], [sAlisName], [notes], [userName], [ANA]) VALUES (@uNameID, @createdatetime, @Genera, @sName, @sAlisName, @notes, @userName, @ANA)"
SelectCommand="SELECT * FROM [SongsCW]" UpdateCommand="UPDATE [SongsCW] SET [uNameID] = @uNameID, [createdatetime] = @createdatetime, [Genera] = @Genera, [sName] = @sName, [sAlisName] = @sAlisName, [notes] = @notes, [userName] = @userName, [ANA] = @ANA WHERE [songID] = @songID" OnSelected="SqlDataSource1_Selected">
<asp:Parameter Name="songID" Type="Int32" />
code behind lag C#
protected void SqlDataSource1_Selected(object sender, SqlDataSourceStatusEventArgs e)
Thanks in advance for any help!