Home » Posts tagged "Controls" (Page 3)

Archive for the 'Controls' Tag

VB.NET – add record in code behind

MyForm.aspx <asp:TextBox ID=”AddRec” runat=”server”> </asp:TextBox> <asp:Button ID=”AddBtn” runat=”server” Text=”Add” /> <asp:Label ID=”LblMsg” runat=”server”> </asp:Label> MyForm.aspx.vb Protected Sub AddBtn_Click(sender As Object, e As System.EventArgs) Handles AddBtn.Click Dim NewRec As TextBox ‘binding controls NewRec = AddBtn.FindControl(“AddRec”) If NewLoc.Text.ToString() “” Then ‘/ access db connection – ‘/ MS Access 2007/10 driver * you can define your own sql […]