Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editing a textbox
Message
 
To
25/06/2004 12:12:58
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00917277
Message ID:
00917982
Views:
6
Bonnie;

No, I missed the post. Thank you for your response.

This is bound (pun intended) to upset people but somehow I thing that VFP and ASP ADO require a bit less code. One example in ADO for instance:

oRS(“City”) = frmCustomers.txtCity.Value
oRS.Update

Tom


>Tom,
>
>Did you miss the thread from a coupla days ago about two-way databinding? Check out Message #915399.
>
>~~Bonnie
>
>>I would appreciate someone pointing me in the right direction. The text boxes are populated and I want to edit a text box.
>>
>>1. Using SQL Server 2000, ASP.NET with VB.NET
>>2. Attempting to edit a record from a textbox.
>>
>>Code used in CodeBehind page
>>
>>
>>
>>Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
>>        'Put user code to initialize the page here
>>
>>        SqlDataAdapter1.Fill(dsCustomers.Customers)
>>
>>        Dim drCity As DataRow
>>        Dim iCurrentrow As Integer
>>
>>        drCity = dsCustomers.Tables("Customers").Rows(iCurrentrow)
>>
>>        txtCity.Text = drCity("City")
>>        txtCountry.Text = drCity("Country")
>>        txtCompanyName.Text = drCity("CompanyName")
>>
>>        Call DataBind()
>>
>>    End Sub
>>
>>
>>
>>    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
>>
>>
>>' <b><i>The value from txtCity remains at the original entry... </b></i>
>>
>>''''dsCustomers.Tables("Customers").Rows(0)("City") = txtCity.Text
>>
>>
>>' <b><i>You can delete the quotes and the record value will change - BUT - you have to click the save Button twice! </b></i>
>>
>>
>>      ''''dsCustomers.Tables("Customers").Rows(0)("City") = "Tester"
>>
>>      dsCustomers.Tables("Customers").Rows(0)("City") = "Berlin"
>>
>>      SqlDataAdapter1.Update(dsCustomers, "Customers")
>>
>>    End Sub
>>End Class
>>
>>
>>
>>
>>Reading the available books and on line "examples" has not helped.
>>
>>Tom
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform