Click here to Skip to main content
15,905,967 members

Comments by Member 12953926 (Top 7 by date)

Member 12953926 29-Jan-24 9:23am View    
hi Richard,
Thanks for the above suggestions. Its working perfect for windows virtual machines. very recent i have noticed In linux VM when i name a partial view with few names like _CTS.cshtml,_Cpl_Scrn.cshtml,_CTC.cshtml is not working. Should i follow any naming convention when i create partial view for Linux machines ?
Member 12953926 13-Dec-22 7:46am View    
Its works with Plain HTML code.

Now the situation is with C# code.

For Example:
Page 1 description:
var input = "Hello This is Same{partv _AllPages}Some Content{partv _AllPost}";

Page 2 description:
var input = "Hello This is Same{partv _AllPages}Some Content";

Html.Partial("_AllPosts") ==> having C# code for getting the dynamic data.

Output: Now if I load Page 2 in browser, control is going to Html.Partial("_AllPosts") partial view page(_AllPosts.cshtml). Not sure why. For Page 2 it should not go. Because the short code is not present in description column.


Member 12953926 13-Dec-22 7:20am View    
Actually i want to define the Partial View dynamically(without Ajax). Like short code. If the short code exists in the description,, then that should be replaced with the Partial view. Any thoughts on this ?
Member 12953926 13-Dec-22 6:02am View    
hi Richard. There is one issue..
in the above script - var input = "Hello This is Same{partv _AllPages}Some Content{partv _AllPost}";
i have removed one partv and its now
var input = "Hello This is Same Some Content";

In the result its calling Html.Partial("_AllPages") and Html.Partial("_AllPosts"). They should be get replaced if its exists in input.

This time in Html.Partial("_AllPages") and Html.Partial("_AllPosts") i have added C# code. Please help.
Member 12953926 2-Sep-22 7:01am View    
hi Richard, The above scrip work perfects. Can we cut-shot the script? Because there will be around 200+ partial view in my project. Is there any better way to do?