I am using WebForms, for the platform that is already working correctly in the work, in conjunction with VB.NET, I have a question on how to work with a single text field, and, in turn, the same Text field can work to store different information in the database.
I have my SQL Server table like the following
CREATE TABLE TblUser(
UserID INT IDENTITY(1,1) PRIMARY KEY,
UserName varchar(50),
UserLastName varchar(50),
UserAge INT,
UserPhone varchar(50),
UserEmail varchar(50),
UserCreated_at DateTime,
UserUpdated_at DateTime
)
The main idea is to be able to use a single text field for all the fields. You can use a one-dimensional array and so, after filling the array proceed to save the information in the Database.
In the following image
What is he going to do?
In the Label "Enter name:", you will save the user's name, then the Label will appear "Enter Last Name:" and the TextBox will allow you to save the Last Name, and it will be successively.
Only, I do not know how to perform the operations to achieve the expected result.
Here is the VB.NET code
Frontend
<asp:Label ID="lblChange" runat="server" Text="Ingrese nombre:"></asp:Label>
<asp:TextBox ID="txtChange" runat="server" Width="190px"></asp:TextBox>
Backend
Imports System.Data
Partial Class userRegister
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
txtChange.Focus()
End Sub
Protected Sub txtChange_TextChanged(sender As Object, e As System.EventArgs) Handles txtChange.TextChanged
End Sub
End Class