DetailsView problem

D

drasko

I have DetailsView control in Insert mode and I want to fill its cells
initially with values retrieved from ActiveDirectory. User would add
some data in other cells of DetailsView and after clicking on Insert
these data would be inserted into table. Until now, I can retrieve
values from AD, fill cells of DetailsView, but after clicking Insert I
get the following message:

<
Value cannot be null.
Parameter name: FirstName
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: FirstName

Source Error:

Line 11841: System.Data.SqlClient.SqlCommand command =
this.CommandCollection[3];
Line 11842: if ((FirstName == null)) {
Line 11843: throw new System.ArgumentNullException("FirstName");
Line 11844: }
Line 11845: else {
If I manually enter values (ea without programatically filling cells),
insert goes well.
I am filling cells in following manner:

((TableCell)UserDetailsView.Rows[1].Cells[1]).Text = firstName;

How can I get rid of this error?
Thanks in advance!

Drasko
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top