I have created SignUp Form In Asp.net in this I am Using SQL Server Database. I Have Two Table Like EducationInfo and UserInfo . EducationInfo Table contain following column (EduId(PK),User_Id(FK),Degree,University,Passing Year,Percentage) and UserInfo Table contain following column (User_Id(PK),UserName,Password,FirstName,MiddleName,LastName,Country,City).
And finally i have create below form Like First Of User Fill Up Personal Information (FirstName,MiddleName,LastName,Coutry,City) than Education Information(Degree,University,Passing Year,Percentage) than Bind Grid Education Info than User Information (UserName,Password) .
In this form i have problem in insert data how in education info table and UserInfo table.
Without UserId how i am inserting in educationinfo table data....so help me sir/mem...
<body>
<form id="form1" runat="server">
------- Personal Info --------
|
<asp:Label ID="LblFname" runat="server" Text="FirstName">
| <asp:TextBox ID="TxtFname" runat="server">
|
<asp:Label ID="LblMName" runat="server" Text="MiddleName">
| <asp:TextBox ID="TxtMName" runat="server">
|
<asp:Label ID="LblLName" runat="server" Text="LastName">
| <asp:TextBox ID="TxtLName" runat="server">
|
<asp:Label ID="LblCountry" runat="server" Text="Country">
| <asp:TextBox ID="TxtCountry" runat="server">
|
<asp:Label ID="LblCity" runat="server" Text="City">
| <asp:TextBox ID="TxtCity" runat="server">
|
------- Education Info --------
|
<asp:Label ID="LblDegree" runat="server" Text="Degree">
| <asp:TextBox ID="TxtDegree" runat="server">
|
<asp:Label ID="LblUniversity" runat="server" Text="University">
| <asp:TextBox ID="TxtUniversity" runat="server">
|
<asp:Label ID="LblPassingYear" runat="server" Text="Passing Year">
| <asp:TextBox ID="TxtPassingYear" runat="server">
|
<asp:Label ID="LblPercentage" runat="server" Text="Percentage">
| <asp:TextBox ID="TxtPercentage" runat="server">
|
<asp:Button ID="BtnAddDegree" runat="server" Text="Add Degree" Style="margin-left: 23%;" OnClick="BtnAddDegree_Click" />
<asp:Label ID="LblResultDegree" runat="server">
|
<asp:ListView ID="LstSignUp" runat="server">
<emptydatatemplate>
<asp:Label ID="LblEmptyData" runat="server">
|
<layouttemplate>
<tr id="itemPlaceholder" runat="server"> |
<itemtemplate>
<asp:Label ID="GrdRDegree" runat="server" Text='<%#Eval("Degree") %>' >
<asp:Label ID="GrdRUniversity" runat="server" Text='<%#Eval("University") %>' >
<asp:Label ID="GrdRPYear" runat="server" Text='<%#Eval("Passing_Year") %>' >
<asp:Label ID="GrdRPercentage" runat="server" Text='<%#Eval("Percentage") %>' >
------- User Info --------
<asp:Label ID="LblUname" runat="server" Text="UserName">
<asp:TextBox ID="TxtUname" runat="server">
<asp:RequiredFieldValidator ID="RfvUname" runat="server" ControlToValidate="TxtUname" Text="Please Enter UserName" ValidationGroup="VG" CssClass="reqerror">
<asp:Label ID="LblPwd" runat="server" Text="Password">
<asp:TextBox ID="TxtPwd" runat="server" TextMode="Password">
<asp:RequiredFieldValidator ID="RfvPwd" runat="server" ControlToValidate="TxtPwd" Text="Please Enter Password" ValidationGroup="VG" CssClass="reqerror">
<asp:Button ID="BtnSubmit" runat="server" Text="Submit" Style="margin-left: 35%;" ValidationGroup="VG" OnClick="BtnSubmit_Click" />
<asp:Label ID="lblResult" runat="server">
</form>
</body>