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
99.4k
Dataliastpagenation
Jan 29 2016 11:54 AM
plz tell me how to do this pagenation i dnt want any links just give me solution my prbm i searched many articles google so
<asp:DataList ID="dlImages" runat="server" RepeatColumns="4" CellPadding="5" style="margin-left:536px" >
<ItemTemplate>
<%--<a id="imageLink" href='<%# Eval("~/images/{0}") %>' title='<%#Eval("Description") %>' rel="lightbox[Brussels]" runat="server" >--%>
<asp:ImageButton ID="Image1" OnClick="Image1_Click" ImageUrl='<%# Container.DataItem %>' runat="server" Width="112" Height="84" />
</a>
</ItemTemplate>
<ItemStyle BorderColor="Brown" BorderStyle="dotted" BorderWidth="3px" HorizontalAlign="Center"
VerticalAlign="Bottom" />
</asp:DataList>
......................................
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bindrepe();
}
}
public void bindrepe()
{
string[] filesindirectory = Directory.GetFiles(Server.MapPath("~/images"));
List<String> images = new List<string>();
foreach (string item in filesindirectory)
{
images.Add(String.Format("~/images/{0}", System.IO.Path.GetFileName(item)));
}
images.Remove("~/images/blank.gif");
images.Remove("~/images/happy vans logo.png");
images.Remove("~/images/loading.gif");
Image1.ImageUrl = images[0];
dlImages.DataSource = images;
dlImages.DataBind();
}
protected void Image1_Click(object sender, ImageClickEventArgs e)
{
ImageButton pic = (ImageButton)sender;
string filename = pic.ImageUrl;
Image1.ImageUrl = filename;
}
Reply
Answers (
0
)
Create & Download zip file from remote directory using C#
On MVC form how can I add validate two fields on form