how to make Responsive DataList asp.net
-
I have an Asp.net DataList control in my page. It is currently having repeatcolumns set to 4 which will give me 4 columns in each row. But I want to make this responsive and set the value to 1 for smaller screen sizes. Below is my asp.net control: <asp:DataList runat="server" RepeatDirection="Horizontal" RepeatColumns="4" ID="dd" class="vex-res"> How can I achieve this?
-
Answer:
You cannot make DataList to be responsive, because it renders as Table. Instead, you need to use http://msdn.microsoft.com/en-us/library/bb398790.aspx with bootstrap (or some other responsive framework). <asp:ListView ID="ListView1" runat="server" ...> ... <ItemTemplate> <div class="row"> <div class="col-md-4"><%# Eval("Name") %></div> <div class="col-md-4"><%# Eval("Email") %></div> <div class="col-md-4"><%# Eval("Address") %></div> </div> </ItemTemplate> </asp:ListView>
newguy at Stack Overflow Visit the source
Related Q & A:
- How can I allow user to create posts in website using ASP.NET?Best solution by Programmers
- How to Undo previous action in asp.net?Best solution by forums.asp.net
- How to Search using jQuery ASP.Net?Best solution by Stack Overflow
- How to Play Audio files in ASP.NET?Best solution by Stack Overflow
- How to make asp.net datalist responsive?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.