D
David Wertz
I am sure that I am missing something very simple here or my entire approach
is flawed. All I am trying to accomplish is to create a new record and carry
over the customer id to be saved with the new contract.
I have a button on a customer form to create a new contract record.
Response.Redirect("~/ContentPages/Contract.aspx?id=-1&custid=" & CustID)
I am passing CustID as a querystring from one page to another page called
'contract.aspx'. I also pass the ID=-1 to indicate that it is a NEW record
and to change the mode of the Formview to 'Insert' mode.
On contract.aspx I have a Formview control called 'frmContract'. In the
'ItemInsertTemplate' I have textboxes for each field of the contract record
including one for CustID. All of the textboxes are databound to a
SQLDATASOURCE.
MY PROBLEM:
I cannot get CustID into the tbxNewCustID textbox so that it gets inserted
during the update command. I cannot figure out how to get a reference to the
textbox within the FORMVIEW control. How can I do something like
'formview.tbxNewCustID = QuerystringParameter'?
I hope I have described this well enough.
is flawed. All I am trying to accomplish is to create a new record and carry
over the customer id to be saved with the new contract.
I have a button on a customer form to create a new contract record.
Response.Redirect("~/ContentPages/Contract.aspx?id=-1&custid=" & CustID)
I am passing CustID as a querystring from one page to another page called
'contract.aspx'. I also pass the ID=-1 to indicate that it is a NEW record
and to change the mode of the Formview to 'Insert' mode.
On contract.aspx I have a Formview control called 'frmContract'. In the
'ItemInsertTemplate' I have textboxes for each field of the contract record
including one for CustID. All of the textboxes are databound to a
SQLDATASOURCE.
MY PROBLEM:
I cannot get CustID into the tbxNewCustID textbox so that it gets inserted
during the update command. I cannot figure out how to get a reference to the
textbox within the FORMVIEW control. How can I do something like
'formview.tbxNewCustID = QuerystringParameter'?
I hope I have described this well enough.