W
Wernfried Schwenkner
In a page I have a button. On the code behind in the click event I wan't
to fill a data table of the sql server.
Therefor I have place a SqlDataSource on the page in the designer,
configured all the connections and got the <asp:SqlDataSource>, it's
commands and the <UpdateParameter> for the update command generated.
I wan't to use the update to initialize some fields in my table.
Now I don't know, how to put the data into the update command.
SqlDataSource1.UpdateParameters["Image"] = byteContentOfImage;
SqlDataSource1.Update();
doesn't work, the compiler says
Cannot implicitly convert type 'byte[]' to
'System.Web.UI.WebControls.Parameter'
and a typecast also doesn't work.
How can I fill some data into the parameter?
to fill a data table of the sql server.
Therefor I have place a SqlDataSource on the page in the designer,
configured all the connections and got the <asp:SqlDataSource>, it's
commands and the <UpdateParameter> for the update command generated.
I wan't to use the update to initialize some fields in my table.
Now I don't know, how to put the data into the update command.
SqlDataSource1.UpdateParameters["Image"] = byteContentOfImage;
SqlDataSource1.Update();
doesn't work, the compiler says
Cannot implicitly convert type 'byte[]' to
'System.Web.UI.WebControls.Parameter'
and a typecast also doesn't work.
How can I fill some data into the parameter?