Hello,
I’m trying to use a @helper inside a Telerik Window widget but it doesn’t work as expected. If I use the @helper then it shows the TextBox widget in the main page without opening/showing the Window widget but the labels are shown as expected however if I write the code in the @helper directly in the Window widget then it works as expected. Why this strange behavior?
Here's the code
01.@helper MakeTextBox1(string name, string description)02.{03. <li>04. <label for="@name">@description</label>05. @{06. var x = Html.Kendo().TextBox()07. .Name(@name);08. 09. x.Render();10. }11. </li>12.}13. 14.@(Html.Kendo().Window()15. .Name("window_CreateProduct")16. .Title("Product")17. .Content(@<text>18. <div style="text-align: center;">19. <form id="form">20. <ul class="fieldlist">21. 22. // Doesn't work23. @MakeTextBoxNumeric1("amount", "Amount") 24. 25. // It works!26. <li>27. <label for="numeric_Price">Price: </label>28. @(Html.Kendo().NumericTextBox()29. .Name("numeric_Price")30. )31. </li>32. </ul>33. </form>34. 35. </div>36. </text>)37. .Draggable()38. .Visible(false)39. .Modal(true)40. .Resizable(x => x.Enabled(false))41. .Events(x => x.Open("onOpen_window"))42.)
Can anyone help me to solve this?
Thank you.