>Hi everybody,
>
>I'm passing parameters to SP and using InsertCommand for SQLDataSource. The error coming from the SP tells me that one of the parameters is NULL, but it should not be NULL, I believe.
>
>Do you know how can I get parameters (and in which method) how they were passed to SP?
>
>Thanks a lot in advance.
Hi Naomi,
you can use the "Inserting" event of the SQLDatasource object, to check or manipulate its InsertParameters collection. This event fires right before the data will be inserted.
For example:
protected void SqlDataSource1_Inserting(object sender, SqlDataSourceCommandEventArgs e)
{
if(this.SqlDataSource1.InsertParameters[0]==null)
{
// stop the insert process
e.Cancel = true;
}
}
Holger Vorberg
Germany