-
Notifications
You must be signed in to change notification settings - Fork 0
/
MVCInformation.txt
47 lines (39 loc) · 1.61 KB
/
MVCInformation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
3. Àðõèòåêòóðà íà ASP.NET MVC
...........................................................................
Òîâà ãî ïèøà â êîíòðîëåðà...
[HttpPost, ActionName("Process")]
[HandleError(ExceptionType = typeof(ArgumentException), View = "Error")]
public ActionResult ProcessForm(string text)
{
throw new ArgumentException();
return Context(text);
}
Òîâà ãî ïèøà â Web.config
<system.web>
<customErrors mode="On" defaultRedirect="Error">
<error statusCode="500" redirect="~/Views/Shared/500.cshtml" />
<error statusCode="404" redirect="~/Views/Shared/NotFound.cshtml" />
</customErrors>
</system.web>
...........................................................................
1:37:00 ViewHelpers
...........................................................................
@using(Html.BeginForm("Test", "Home"))
{
<input type="text" name="text" />
<input type="submit" value="Submit" />
}
@Html.TextBox("username", "", htmlAttributes: new {id = "my-id", @class = "my-class"})
@Html.ActionLink("Click me", "Index", "Home", routeValues: new{})
@Url.Action("Index", "Home")
@Url.Content("~/Images/img.jpg")
...........................................................................
2:30:00 Areas
...........................................................................
@Model.Price.ToString("C", new CultureInfo("en-US"))
...........................................................................
4. Ðàáîòà ñ äàííè
...........................................................................
7. SignalR
...........................................................................
Context å èíôîðìàöèÿ çà ñðåäàòà â êîÿòî ñå èçïúëíÿâà íåùî.