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
Guest User
Tech Writer
2.1k
469.9k
How to pull table record from the database in asp.net mvc 5?
Sep 23 2020 9:29 AM
Hi Team
I really need some help, i cant pull the table record from the client side, once a user click Next. Before user must first select email-address and insert fromt the textbox, thereafter be prompt when clicking next, with details such as Name, EmailAddress, LoginId, Insitution. This is what i have currently, bit stuck
<div
class
=
"form-group row"
>
<div
class
=
"col-sm-4"
>
<input type=
"radio"
id=
"EmailAddress"
name=
"choose"
/>
<label
for
=
"EmailAddress"
class
=
"col-form-label"
>EmailAddress</label>
</div>
<div
class
=
"col-sm-3"
>
<input type=
"radio"
id=
"LoginID"
name=
"choose"
/>
<label
for
=
"LoginID"
class
=
"col-form-label"
>LoginID</label>
</div>
<div
class
=
"col-sm-3"
>
<input type=
"radio"
id=
"SIS_ID"
name=
"choose"
/>
<label
for
=
"SIS_ID"
class
=
"col-form-label"
>SIS_ID</label>
</div>
<div
class
=
"col-sm-12"
>
@Html.TextAreaFor(m => m.eNtsaAdmin.eNtsaTextAreaDisc,
new
{ @
class
=
"form-control"
, style =
"font-size: medium; font-weight: bold; width:450px"
, id=
"eNtsaTextAreaDisc"
})
</div>
<hr />
</div>
<div
class
=
"modal-footer"
>
<button type=
"button"
class
=
"btn btn-secondary"
data-dismiss=
"modal"
>Close</button>
<button type=
"button"
class
=
"btn btn-primary"
data-toggle=
"modal"
data-target=
"#exampleModalCenter"
id=
"btnNext"
>
Next
</button>
</div>
@
foreach
(var data
in
Model.regPeopleLists)
{
}
<div
class
=
"modal-body"
>
<table
class
=
"table table-bordered"
>
<thead>
<tr>
<th>Name</th>
<th>EmailAddress</th>
<th>LoginID</th>
<th>SISID</th>
</tr>
</thead>
</table>
</div>
<!--This functionality applies to radio button change state-->
<script type=
"text/javascript"
>
$(document).ready(function () {
$(document).ready(function () {
// Fire when radio button clicked
$(
"#LoginID, #SIS_ID"
).bind(
"change"
, function () {
checkdata();
});
// Fire when we enter anything in the textbox
$(
"#eNtsaTextAreaDisc"
).bind(
"input"
, function () {
checkdata();
});
});
//here we check both radio button clicked and textbox filled with some information
function checkdata() {
if
(($(
"#LoginID"
).prop(
"checked"
) || $(
"#SIS_ID"
).prop(
"checked"
)) && $(
"#eNtsaTextAreaDisc"
).val().length > 0) {
$(
"#btnNext"
).removeAttr(
"disabled"
);
}
else
{
$(
"#btnNext"
).attr(
"disabled"
,
"disabled"
);
}
}
</script>
Reply
Answers (
1
)
how to insert Html content from Web API to a Datatable
SSO implementation for MVC ASP.NET Core application