Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model My20486_03_CalcMVC.Models.Calc1
- @{
- Layout = null;
- string cssPlus = "", cssMinus = "";
- if(Model.Operation == "+") {
- cssPlus = "pressed";
- }
- if (Model.Operation == "-")
- {
- cssMinus = "pressed";
- }
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>Index</title>
- <style>
- .pressed {
- background-color:pink;
- }
- </style>
- </head>
- <body>
- <div>
- <form action="DoCalc" method="post">
- <input type="text" name="x" value="@Model.X" /> <br />
- <input type="text" name="y" value="@Model.Y" /> <br />
- <input type="submit" name="operation" value="+" class="@cssPlus" />
- <input type="submit" name="operation" value="-" class="@cssMinus" /> <br />
- <input type="text" name="z" value="@Model.Z" />
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement