Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to: Replace NextPageText text with an image?

0 views
Skip to first unread message

george d lake

unread,
May 2, 2003, 4:01:49 PM5/2/03
to
Hi,
I have only seen 2 or 3 sites on how to do this (post form forums) but
they do not work (or I just do not get it)

Here are the 2 that I have found:

1.-
Modify the property of PagerStyle of your DataGrid control in the Property
Window:
NextPageText -> > -> <img src=Images/NextPageGif.gif>
PrevPageText -> < -> <img src=Images/PrevPageGif.gif>
(src point to your GIF location)
Just change the text to a HTML like tag is fine.

Did that and they both show regarless. (now that I look at it, do I need the
"-> > ->" ?????)

2.-
Create a Style wich contains a image to page (i.e Arrows) and set that to
CssClass Property.
CAUTION: In the image add 2 arrows as a single image(<-- -->) and
NextPageText andPrevPageText Use spaces to adjust the image

This one I just do not get. again, if the image has both <> then how will
one not show if you are at the end or beginning of the set?


anyone ?

Thanks.

Ken Cox [Microsoft MVP]

unread,
May 2, 2003, 8:30:08 PM5/2/03
to
Is it escapign the markup properly that is giving you trouble? Here's a
pagerstyle section that references images rather than displaying text. Notice
how the < and > need to be escaped:

<pagerstyle verticalalign="Top" nextpagetext="&lt;img
src='http://www.gc.ca/images/francaisbt.gif'&gt;"
prevpagetext="&lt;img
src='http://www.gc.ca/images/englishbt.gif'&gt;" borderstyle="Inset"
horizontalalign="Center" forecolor="Black" position="Top"
backcolor="#AAAADD"></pagerstyle>

Ken

<%@ Page CodeBehind="gridpgng.aspx.vb" Language="vb" AutoEventWireup="true"
Inherits="p733workev.gridpgng" %>
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body ms_positioning="FlowLayout">
<form runat="server" method="post">
<asp:datagrid runat="server" id="myDataGrid" borderwidth="5px"
bordercolor="Black" borderstyle="Double"
pagerstyle-verticalalign="top" cellpadding="4" cssclass="DataGrid"
headerstyle-forecolor="Black"
headerstyle-font-bold="True" allowsorting="True"
onsortcommand="SortCommand_OnClick" allowpaging="True"
onpageindexchanged="PageIndexChanged_OnClick" width="100%"
headerstyle-backcolor="#aaaadd" alternatingitemstyle-backcolor="#eeeeee"
pagerstyle-backcolor="#aaaadd" pagerstyle-forecolor="Black"
pagerstyle-horizontalalign="center"
pagerstyle-borderstyle="Inset" showfooter="True" pagesize="5">
<alternatingitemstyle backcolor="#EEEEEE"></alternatingitemstyle>
<headerstyle font-bold="True" forecolor="Black"
backcolor="#AAAADD"></headerstyle>
<pagerstyle verticalalign="Top" nextpagetext="&lt;img
src='http://www.gc.ca/images/francaisbt.gif'&gt;"
prevpagetext="&lt;img
src='http://www.gc.ca/images/englishbt.gif'&gt;" borderstyle="Inset"
horizontalalign="Center" forecolor="Black" position="Top"
backcolor="#AAAADD"></pagerstyle>
</asp:datagrid>
</form>
<asp:label id="SQLStatement" runat="server" visible="false" />
</body>
</html>

"george d lake" <geo...@valleyyellowpages.com> wrote in message
news:uga1rWOE...@TK2MSFTNGP12.phx.gbl...

George Lake

unread,
May 5, 2003, 5:59:39 PM5/5/03
to

Hi, thanks for the code, but I still have one problem.
How do I not show (or change the image) when I can not move Next? If I
am on the last page, I should not see the "Next" image.

thanks....

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

0 new messages