Hello
I have a listView to show information from ClientTemplateId("template")
uses and its code:
<script type="text/x-kendo-tmpl" id="template">
<span class='newfile'>
#: FileName #
</span>
<div id='myUpload'>
</div>
</script>
@(Html.Kendo().ListView<MSG_UserMessagesList_Ex_For_Model>()
.Name("listView")
.TagName("div")
.ClientTemplateId("template")
.DataSource(dataSource => dataSource
.Ajax()
.Read(r => r.Url(@Url.Page("MsgList", "MSG_UserMessagesList_Ex")).Data("forgeryToken"))
)
)
I want another ListView that also uses .ClientTemplateId("templateFileUpload") with code Below :
<script type="text/x-kendo-tmpl" id="templateFileUpload">
<span class="old message">
#: FileName #
</span>
</script>
@(Html.Kendo().ListView<BehniafarTicket.Data.FileUpload_Select_Model>()
.Name("listViewFileUpload")
.TagName("div")
.ClientTemplateId("templateFileUpload")
.DataSource(dataSource => dataSource
.Ajax()
.Read(r => r.Url(@Url.Page("MsgList", "FileUpload_Select").Data("forgeryToken"))
)
)
I need to add the listview -listViewFileUpload- in inside the <div id='myUpload'> tag </div> but I get an error.
My final code should look like the following, the error I get is because of the internal script tag with the full title
<script type="text/x-kendo-tmpl" id="templateFileUpload">
is.
<script type="text/x-kendo-tmpl" id="template">
<span class='newfile'>
#: FileName #
</span>
<div id='myUpload'>
<script type="text/x-kendo-tmpl" id="templateFileUpload">
<span class="old message">
#: FileName #
</span>
</script>
@(Html.Kendo().ListView<BehniafarTicket.Data.FileUpload_Select_Model>()
.Name("listViewFileUpload")
.TagName("div")
.ClientTemplateId("templateFileUpload")
.DataSource(dataSource => dataSource
.Ajax()
.Read(r => r.Url(@Url.Page("MsgList", "FileUpload_Select",new{MessageId= #: MessageId # }).Data("forgeryToken"))
)
)
</div>
</script>
@(Html.Kendo().ListView<MSG_UserMessagesList_Ex_For_Model>()
.Name("listView")
.TagName("div")
.ClientTemplateId("template")
.DataSource(dataSource => dataSource
.Ajax()
.Read(r => r.Url(@Url.Page("MsgList", "MSG_UserMessagesList_Ex")).Data("forgeryToken"))
)
)
please help me