TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Phaneendra Chakravaram
NA
490
100.8k
multiple Datalists data showing only on datalist
Dec 23 2016 1:32 AM
Hi here iam using 3 datalists to showing data but i need instead of using 3 datalists i need to use one datalist bcz i need to sort data .if its is one datalist i can sort data.but here three datalists. but query is same in three datalists select command. but here i need to show youtube video and normal local player video and pdf file so i used 3 datalists here i copied my code please give solution.(content type i need to write condition this is only aspx page no c# code in this page so any solution for this)
<asp:AccessDataSource ID="AccessDataSource6" runat="server" DataFile="/fpdb/SVBS1.accdb"
SelectCommand="SELECT lm.Title, lm.URL, lm.Description from Content as lm where lm.CourseSection=? and lm.ContentType='VideoSVBS'"> //here contenttype videos in svbs(means local video)
<SelectParameters>
<asp:QueryStringParameter DefaultValue="0" Name="ID" QueryStringField="SectionId"
Type="Int32" />
</SelectParameters>
</asp:AccessDataSource>
<asp:DataList ID="DataList1" runat="server" class="bulletlist" DataSourceID="AccessDataSource6"
CellPadding="0">
<ItemTemplate>
<li style="margin-left: 9px"><%# Eval("Title")%></li>
<p style="margin-left: 9px" ><%# Eval("Description")%></p>
<div style="margin-left:10px">
<div id="mediaplayer<%# Eval("URL")%>" style="text-align:center; vertical-align:top; width:100%; margin:10px; padding:10px;padding-left:27px">
<script type="text/javascript">
jwplayer("mediaplayer<%# Eval("URL")%>").setup({
flashplayer: "player.swf",
file: "/h264/<%# Eval("URL")%>.mp4",
height: 113,
width: 200,
});
</script>
</div>
</div>
</ItemTemplate>
</asp:DataList>
<asp:DataList ID="DataList3" runat="server" class="bulletlist" DataSourceID="AccessDataSource1"
CellPadding="0">
<ItemTemplate>
<li style="margin-left: 9px"><%# Eval("Title")%></a></li>
<p style="margin-left: 9px"><%# Eval("Description")%></p>
<iframe width="200" style="margin-left:10px" height="113" src="https://www.youtube.com/embed/<%# Eval("URL")%>" frameborder="0" allowfullscreen></iframe>
</ItemTemplate>
</asp:DataList>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="/fpdb/SVBS1.accdb"
SelectCommand="SELECT lm.Title, lm.URL, lm.Description from Content as lm where lm.CourseSection=? and lm.ContentType='VideoYouTube'"> //here content type is (video youtube)
<SelectParameters>
<asp:QueryStringParameter DefaultValue="0" Name="CourseSection" QueryStringField="SectionId"
Type="Int32" />
</SelectParameters>
</asp:AccessDataSource>
<asp:DataList ID="DataList5" runat="server" class="bulletlist" DataSourceID="AccessDataSource2"
CellPadding="0">
<ItemTemplate>
<li style="margin-left: 9px"><a href="<%# Eval("URL")%>" target="_blank" class="PinkLink"><%# Eval("Title")%></a></li>
<p style="margin-left: 9px"><%# Eval("Description")%></p>
</ItemTemplate>
</asp:DataList>
<asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="/fpdb/SVBS1.accdb"
SelectCommand="SELECT lm.Title, lm.URL, lm.Description from Content as lm where lm.CourseSection=? and lm.ContentType<>'VideoYouTube' and lm.ContentType<>'VideoSVBS'and lm.hide <> true">//(here content type both)
<SelectParameters>
<asp:QueryStringParameter DefaultValue="0" Name="CourseSection" QueryStringField="SectionId"
Type="Int32" />
</SelectParameters>
</asp:AccessDataSource>
Reply
Answers (
5
)
I have Simple website build in ASP.NET MVC 4
facebook login automatically