I'm using trial version of Kendo UI Complete for ASP.NET MVC to test some features of the mobile component.
I'm trying to build a mobile app to test some features, but I'm having some problems to understand some concepts.
1. The initialization of the app:
Should be done just once, to be able to use the navigation capabilities of the kendo framework, am I right? Using the MVC pattern of ASP.NET MVC, where is the best place to put this piece of code? There is some best practice/suggestion to place the initialization?
2. This question is related with the first one. In the "Create" view, I have the following code:
And the "Create" action in the controller is like this:
So when I click the "Create" button, the information is stored in the database, but the RedirectToAction("Index") is forcing the rebuild of all HTML, so the mobile app is no more initialized, without the mobile styles (because I'm initializing just once in another controller action).
How should I solve this?
3. Finally, I would Like to know how can I change the style of the "Create" input to be like a kendoMobileButton?
Any kind of suggestion or guidance will be very appreciated!
I'm trying to build a mobile app to test some features, but I'm having some problems to understand some concepts.
1. The initialization of the app:
var
app =
new
kendo.mobile.Application();
2. This question is related with the first one. In the "Create" view, I have the following code:
@model MiniSIGEMobile.Models.Student
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<
ul
data-role
=
"listview"
data-inset
=
"true"
>
<
li
data-role
=
"fieldcontain"
>
@Html.LabelFor(model => model.Person.FirstName)
@Html.EditorFor(model => model.Person.FirstName)
@Html.ValidationMessageFor(model => model.Person.FirstName)
</
li
>
<
li
data-role
=
"fieldcontain"
>
@Html.LabelFor(model => model.Person.Age)
@Html.EditorFor(model => model.Person.Age)
@Html.ValidationMessageFor(model => model.Person.Age)
</
li
>
<
li
data-role
=
"fieldcontain"
>
@Html.LabelFor(model => model.Course)
@Html.EditorFor(model => model.Course)
@Html.ValidationMessageFor(model => model.Course)
</
li
>
<
li
data-role
=
"fieldcontain"
>
<
input
type
=
"submit"
value
=
"Create"
/>
</
li
>
</
ul
>
}
// POST: /Student/Create
[HttpPost]
[ValidateAntiForgeryToken]
public
ActionResult Create(Student student)
{
if
(ModelState.IsValid)
{
db.Students.Add(student);
db.SaveChanges();
return
RedirectToAction(
"Index"
);
}
return
View(student);
}
How should I solve this?
3. Finally, I would Like to know how can I change the style of the "Create" input to be like a kendoMobileButton?
Any kind of suggestion or guidance will be very appreciated!