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
473.3k
How to create a new content in asp.net mvc?
Aug 17 2020 6:23 AM
Hi Team
I want to create a new content, when a user click the button. I dont if my logic would be correct to say below but if not please assist me.
<div
class
=
"row"
>
<div
class
=
"col-xs-3 ml-auto"
>
<button type=
"button"
class
=
"btn btn-primary"
data-toggle=
"modal"
data-target=
"#exampleModal"
>
Start New Course
</button>
</div>
</div>
<!-- Modal -->
<div
class
=
"modal fade"
id=
"exampleModal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class
=
"modal-dialog"
role=
"document"
>
<div
class
=
"modal-content"
>
<div
class
=
"modal-header"
>
<h5
class
=
"modal-title"
id=
"exampleModalLabel"
>Start New Course</h5>
<button type=
"button"
class
=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span aria-hidden=
"true"
>×</span>
</button>
</div>
<div
class
=
"form-group"
>
<label
for
=
"CourseName"
class
=
"col-sm-2 col-form-label"
>CourseName:</label>
<div
class
=
"col-sm-6"
>
@Html.EditorFor(model => model.CourseName,
new
{ htmlAttributes =
new
{ @
class
=
"form-control"
, autofocus =
"autofocus"
, placeholder =
"CourseName"
} })
</div>
</div>
<div
class
=
"modal-footer"
>
<button type=
"button"
class
=
"btn btn-secondary"
data-dismiss=
"modal"
>Cancel</button>
<button type=
"button"
class
=
"btn btn-primary"
>Create Course</button>
</div>
</div>
</div>
</div>
</div>
<div
class
=
"modal-footer"
>
<button type=
"button"
class
=
"btn btn-secondary"
data-dismiss=
"modal"
>Cancel</button>
<button type=
"button"
class
=
"btn btn-primary"
>Create Course</button>
</div>
</div>
</div>
</div>
</div>
// Jquery
<a
class
=
"btn btn-large btn-success"
id=
"fire"
href=
"/Controller/Courses.chtml#"
>Create Courses</a>
$(
'#fire'
).on(
'click'
, function (e) {
// dont know what to put here....?
Reply
Answers (
1
)
Div class aligning
how to create,rename and delete a content in treeview