I have poor knowledge in front-end and want to find a workaround. My goal is to use output of CSHTML5 in ASP.NET MVC project.
After a day of researching (sorry) I've found such obstacles:
- Don't found a way for easy injecting HTML in C# code. For example it is strong need in pasting formated text. Workarounds for now is to use such code:
Code: Select all
dynamic panel = CSharpXamlForHtml5.DomManagement.GetDomElementFromControl(_rootPanel);
dynamic txt = CSharpXamlForHtml5.DomManagement.Document.createElement("p");
txt.innerHTML = "this is a text";
panel.appendChild(txt);
But the result is unexpected. Text is inserting at the bottom of panel or even dissapeared. Just adding TextBlock's maybe an option, but for large texts it is needed to write additional code to translate XML to textblock objects. Guide me please with a good way. - In general how to add output of CSHTML5 to MVC project so I have 2 ways for end-user : to send them CHTML5 version of page, or regular view. Is there additional editions needed after copying files to dest folders. Already asked there also.
Thanks in advance.