I am hoping this is not a silly question but I have been struggling to find an answer. I have created a web application to insert data into SQL database using T_SQL and stored procedures as I needed to update several tables at the same time. The design of a particular page is using text boxes and dropdown list’s and not the default gridviews or details view as I wanted the page structure set out in a particular way.
Anyways I now want to create an update page which I will get redirected to from a search page.
My question is how do I assign the column values to text boxes or Dropdown lists from my Select statement. I was thinking of having a event in the page load method. Sort of like this ‘Select InvoiceID, Invoicetype, Notes FROM TblInvoice Where Invoicenumber = @Invoicenumber “ the parameter value @Invoicenumber will be assigned via the search page so I will also need to pull that in on the page load event.
So my page would look something like this if say the:-
Textbox1 = InvoiceID(Value) DropDownnlist1 = Invoicetype(Value)
Textbox2 = Notes(Value)
Can someone show me how to write this in a code behind page. I would then click a button to update the values if I changed them and write my update statement for the button click event which I know how to do .........Any ideas on the above would be gratefully received.
Anyways I now want to create an update page which I will get redirected to from a search page.
My question is how do I assign the column values to text boxes or Dropdown lists from my Select statement. I was thinking of having a event in the page load method. Sort of like this ‘Select InvoiceID, Invoicetype, Notes FROM TblInvoice Where Invoicenumber = @Invoicenumber “ the parameter value @Invoicenumber will be assigned via the search page so I will also need to pull that in on the page load event.
So my page would look something like this if say the:-
Textbox1 = InvoiceID(Value) DropDownnlist1 = Invoicetype(Value)
Textbox2 = Notes(Value)
Can someone show me how to write this in a code behind page. I would then click a button to update the values if I changed them and write my update statement for the button click event which I know how to do .........Any ideas on the above would be gratefully received.