R
rogoflap
I don't quite under stand this event in a formview.
I am using this method in a formview. I have a bound text box. Say
UserName that has to be updated before the isert happens.
I have a formview set to an SQLDataSource with Update, Insert, Select,
Delete all inside the control.
I want to Insert a record using the Insert template.
During the Formview.Inserting event I have some code that calculates
the Username then tries to set the Username databound textbox to that
value.
Code is like the following:
dim tx as textbox
tx = formview1.row.findcontrol("txtUserName")
tx.text = sUserName
Now I stopped the code and verified that the sUserName had a value and
that tx.Text had a value, but after the insert happens this field is
blank in the database.
If I manually put in a value in the form then hit the Insert button, it
works fine.
What am I missing here?
I am using this method in a formview. I have a bound text box. Say
UserName that has to be updated before the isert happens.
I have a formview set to an SQLDataSource with Update, Insert, Select,
Delete all inside the control.
I want to Insert a record using the Insert template.
During the Formview.Inserting event I have some code that calculates
the Username then tries to set the Username databound textbox to that
value.
Code is like the following:
dim tx as textbox
tx = formview1.row.findcontrol("txtUserName")
tx.text = sUserName
Now I stopped the code and verified that the sUserName had a value and
that tx.Text had a value, but after the insert happens this field is
blank in the database.
If I manually put in a value in the form then hit the Insert button, it
works fine.
What am I missing here?