TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ugrshen sharma
NA
4
581
In the mvc-5 tab formate data save in sql but not save
Aug 4 2019 6:44 AM
In the mvc-5 we use https://www.W3schools.Com/howto/howto_js_form_steps.Asp this type of login but data not save and after one step come first step please suggest
<div
class
=
"container"
>
<div
class
=
"row justify-content-center align-items-center"
>
@using (Html.BeginForm(
"Register"
,
"Account"
, FormMethod.Post,
new
{ role =
"form"
, id =
"Register"
}))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(
true
,
""
,
new
{ @
class
=
"text-danger"
})
@Html.HiddenFor(model => model.PhoneNumber)
@Html.HiddenFor(model => model.Email)
@Html.HiddenFor(model => model.Password)
@Html.HiddenFor(model => model.ConfirmPassword)
@Html.HiddenFor(model => model.intTitle_ID)
@Html.HiddenFor(model => model.chrFirst_Name)
@Html.HiddenFor(model => model.chrLast_Name)
@Html.HiddenFor(model => model.DOB)
@Html.HiddenFor(model => model.chrMerital_Status_Self)
<h1
class
=
"text-primary"
>Register New User</h1>
<div
class
=
"tab"
>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.PhoneNumber, htmlAttributes:
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.EditorFor(model => model.PhoneNumber,
new
{ htmlAttributes =
new
{ id =
"PhoneNumber"
, name =
"PhoneNumber"
, @placeholder =
"Enter your Phone number"
, @
class
=
"form-control text1"
} })
@Html.ValidationMessageFor(model => model.PhoneNumber,
""
,
new
{ @
class
=
"text-danger"
})
</div>
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.Email, htmlAttributes:
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.EditorFor(model => model.Email,
new
{ htmlAttributes =
new
{ @placeholder =
"Enter your Email"
, @
class
=
"form-control text1"
} })
@Html.ValidationMessageFor(model => model.Email,
""
,
new
{ @
class
=
"text-danger"
})
</div>
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.Password, htmlAttributes:
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.EditorFor(model => model.Password,
new
{ htmlAttributes =
new
{ @placeholder =
"Enter Password"
, @
class
=
"form-control text1"
} })
@Html.ValidationMessageFor(model => model.Password,
""
,
new
{ @
class
=
"text-danger"
})
</div>
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.ConfirmPassword, htmlAttributes:
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.EditorFor(model => model.ConfirmPassword,
new
{ htmlAttributes =
new
{ @placeholder =
"Enter Confirm Password"
, @
class
=
"form-control text1"
} })
@Html.ValidationMessageFor(model => model.ConfirmPassword,
""
,
new
{ @
class
=
"text-danger"
})
</div>
</div>
@*<div
class
=
"form-group"
>
@Html.LabelFor(model => model.intCountry_ID, htmlAttributes:
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.EditorFor(model => model.intCountry_ID,
new
{ htmlAttributes =
new
{ id =
"phone"
, name =
"phone"
, @
class
=
"form-control text-dark text1"
} })
@Html.ValidationMessageFor(model => model.intCountry_ID,
""
,
new
{ @
class
=
"text-danger"
})
</div>
</div>*@
</div>
<div
class
=
"tab"
>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.intTitle_ID,
new
{ @
class
=
" col-md-6 control-label text-primary font-weight-bold "
})
<div
class
=
"col-md-12"
>
@Html.DropDownListFor(m => m.intTitle_ID,
new
SelectList(Model.TitlesList,
"intTitle_ID"
,
"ChrTitle_Name"
),
"Select Title"
,
new
{ @
class
=
"form-control text1"
})
</div>
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.chrFirst_Name, htmlAttributes:
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.EditorFor(model => model.chrFirst_Name,
new
{ htmlAttributes =
new
{ @placeholder =
"Enter your first name"
, @
class
=
"form-control text1"
} })
@Html.ValidationMessageFor(model => model.chrFirst_Name,
""
,
new
{ @
class
=
"text-danger"
})
</div>
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.chrMid_Name, htmlAttributes:
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.EditorFor(model => model.chrMid_Name,
new
{ htmlAttributes =
new
{ @placeholder =
"Enter your Middle name"
, @
class
=
"form-control text1"
} })
@Html.ValidationMessageFor(model => model.chrMid_Name,
""
,
new
{ @
class
=
"text-danger"
})
</div>
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.chrLast_Name, htmlAttributes:
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.EditorFor(model => model.chrLast_Name,
new
{ htmlAttributes =
new
{ @placeholder =
"Enter your Last name"
, @
class
=
"form-control text1"
} })
@Html.ValidationMessageFor(model => model.chrLast_Name,
""
,
new
{ @
class
=
"text-danger"
})
</div>
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.DOB, htmlAttributes:
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.EditorFor(model => model.DOB,
new
{ htmlAttributes =
new
{ @placeholder =
"DD/MM/YYYY"
, @
class
=
"form-control datepicker text1"
} })
@Html.ValidationMessageFor(model => model.DOB,
""
,
new
{ @
class
=
"text-danger"
})
</div>
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.chrMerital_Status_Self,
new
{ @
class
=
"col-md-6 control-label text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.EnumDropDownListFor(model => model.chrMerital_Status_Self,
"Select Marital Status"
,
new
{ @
class
=
"form-control text1"
})
</div>
</div>
@*<div
class
=
"form-group"
>
@Html.LabelFor(model => model.chchrGender,
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold"
})
<div
class
=
"col-md-12"
>
@Html.RadioButtonFor(m => m.chchrGender,
"Male"
) <span>Male</span>
@Html.RadioButtonFor(m => m.chchrGender,
"Female"
)<span>Female</span>
@Html.RadioButtonFor(m => m.chchrGender,
"Other"
)<span>Other</span>
</div>
</div>*@
@*<div
class
=
"form-group"
>
@Html.LabelFor(model => model.chrCountry_Name,
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold "
})
<div
class
=
"col-md-12"
>
@Html.DropDownListFor(m => m.chrCountry_Name,
new
SelectList(Model.ContryList,
"chrCountry_Name"
,
"chrCountry_Name"
),
"Select Country"
,
new
{ @
class
=
"form-control text1"
})
</div>
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.chrState_Name,
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold "
})
<div
class
=
"col-md-12"
>
@Html.DropDownListFor(m => m.chrState_Name,
new
SelectList(Model.StateList,
"chrState_Name"
,
"chrState_Name"
),
"Select State"
,
new
{ @
class
=
"form-control text1"
})
</div>
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.chrCity_Name,
new
{ @
class
=
"control-label col-md-6 text-primary font-weight-bold "
})
<div
class
=
"col-md-12"
>
@Html.DropDownListFor(m => m.chrCity_Name,
new
SelectList(Model.CityList,
"chrCity_Name"
,
"chrCity_Name"
),
"Select City"
,
new
{ @
class
=
"form-control text1"
})
</div>
</div>*@
</div>
<br />
<div style=
"overflow:auto;"
>
<div style=
"float:right;"
>
<button type=
"submit"
id=
"prevBtn"
onclick=
"nextPrev(-1)"
>Previous</button>
<button type=
"submit"
value=
"Register"
id=
"nextBtn"
onclick=
"nextPrev(1)"
>Next</button>
</div>
</div>
<div style=
"text-align:center;margin-top:40px;"
>
<span
class
=
"step"
></span>
<span
class
=
"step"
></span>
</div>
}
</div>
</div>
Reply
Answers (
1
)
Search database and display the results in textboxes
how to fetch the data from SQL